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 - [2026-04-09 06:44:06Z]: 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: 00fe0707-c44c-4494-8a57-73db5b0b4400 Correlation ID: 1068c9b8-b51c-495d-a0c5-9cb15e2e8d51 Timestamp: 2026-04-09 06:44:06Z - Correlation ID: 1068c9b8-b51c-495d-a0c5-9cb15e2e8d51 - Trace ID: 00fe0707-c44c-4494-8a57-73db5b0b4400
(node:5816) [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 - [2026-04-09 06:44:06Z]: 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: 45eee4be-ca24-4717-9f49-3a8dde8c4100 Correlation ID: d6057da2-779b-4025-8633-071f6bef909c Timestamp: 2026-04-09 06:44:06Z - Correlation ID: d6057da2-779b-4025-8633-071f6bef909c - Trace ID: 45eee4be-ca24-4717-9f49-3a8dde8c4100
Error getting the secret: invalid_client: 7000222 - [2026-04-09 06:44:06Z]: 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: 4fb727a0-308c-426b-aaf7-feca45585600 Correlation ID: 259cd7b8-12be-475f-beb5-07a937ef49b9 Timestamp: 2026-04-09 06:44:06Z - Correlation ID: 259cd7b8-12be-475f-beb5-07a937ef49b9 - Trace ID: 4fb727a0-308c-426b-aaf7-feca45585600
Error getting the secret: invalid_client: 7000222 - [2026-04-09 06:44:07Z]: 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: 45eee4be-ca24-4717-9f49-3a8de38c4100 Correlation ID: 2ef8bc97-0484-4f8b-abf3-35a5486a6342 Timestamp: 2026-04-09 06:44:07Z - Correlation ID: 2ef8bc97-0484-4f8b-abf3-35a5486a6342 - Trace ID: 45eee4be-ca24-4717-9f49-3a8de38c4100
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)