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-12 09:31:44Z]: 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: 30003d46-6794-48af-b41e-41384c764200 Correlation ID: 51d950c0-6ca9-4868-938e-633436fb684c Timestamp: 2026-04-12 09:31:44Z - Correlation ID: 51d950c0-6ca9-4868-938e-633436fb684c - Trace ID: 30003d46-6794-48af-b41e-41384c764200
(node:4748) [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-12 09:31:45Z]: 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: 8ed6fc78-3308-44f6-8753-0ce5d0c21e00 Correlation ID: a07d4765-142a-4211-b9a3-b2796baa9aa6 Timestamp: 2026-04-12 09:31:45Z - Correlation ID: a07d4765-142a-4211-b9a3-b2796baa9aa6 - Trace ID: 8ed6fc78-3308-44f6-8753-0ce5d0c21e00
Error getting the secret: invalid_client: 7000222 - [2026-04-12 09:31:45Z]: 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: cb53d8e8-64b3-47b7-abab-a82679f91e00 Correlation ID: 416b0c6e-5b04-4940-b79e-86eba0260aaf Timestamp: 2026-04-12 09:31:45Z - Correlation ID: 416b0c6e-5b04-4940-b79e-86eba0260aaf - Trace ID: cb53d8e8-64b3-47b7-abab-a82679f91e00
Error getting the secret: invalid_client: 7000222 - [2026-04-12 09:31:45Z]: 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: ec39d7ab-1010-46ca-b6cf-e0f6a0ee0500 Correlation ID: e151a2ba-c1c9-4b13-880d-33e143a61008 Timestamp: 2026-04-12 09:31:45Z - Correlation ID: e151a2ba-c1c9-4b13-880d-33e143a61008 - Trace ID: ec39d7ab-1010-46ca-b6cf-e0f6a0ee0500
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)