iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

Error getting the secret: invalid_client: 7000222 - [2025-12-16 14:03:29Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: ac66b8e7-7a0d-4c8b-ab22-e9fcf36f3c00 Correlation ID: 5830076e-5714-4368-834e-3b8e6924905f Timestamp: 2025-12-16 14:03:29Z - Correlation ID: 5830076e-5714-4368-834e-3b8e6924905f - Trace ID: ac66b8e7-7a0d-4c8b-ab22-e9fcf36f3c00
(node:3060) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error getting the secret: invalid_client: 7000222 - [2025-12-16 14:03:29Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: ce563ecf-1af0-482d-90af-9e8955820e00 Correlation ID: 015e45bc-2de6-417f-b9bb-f6697a6a10a4 Timestamp: 2025-12-16 14:03:29Z - Correlation ID: 015e45bc-2de6-417f-b9bb-f6697a6a10a4 - Trace ID: ce563ecf-1af0-482d-90af-9e8955820e00
Error getting the secret: invalid_client: 7000222 - [2025-12-16 14:03:30Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 25030f3f-1052-484e-93a1-9e9fea5c0000 Correlation ID: 79154003-286d-4dae-b43e-7078c881cd24 Timestamp: 2025-12-16 14:03:30Z - Correlation ID: 79154003-286d-4dae-b43e-7078c881cd24 - Trace ID: 25030f3f-1052-484e-93a1-9e9fea5c0000
Error getting the secret: invalid_client: 7000222 - [2025-12-16 14:03:30Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 9074be62-8ebc-4151-8f91-727aa7061e00 Correlation ID: e6927c70-8a63-46bd-a0b8-fadf9c09b271 Timestamp: 2025-12-16 14:03:30Z - Correlation ID: e6927c70-8a63-46bd-a0b8-fadf9c09b271 - Trace ID: 9074be62-8ebc-4151-8f91-727aa7061e00
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'cosdb')
    at C:\stop_order_dev\server.js:25:30
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)