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-02-28 17:32: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: 17bc3835-4fdf-48a5-b089-5461514c3000 Correlation ID: 9d6b0b5f-4eed-435a-8aad-eb0dd13cbb70 Timestamp: 2026-02-28 17:32:06Z - Correlation ID: 9d6b0b5f-4eed-435a-8aad-eb0dd13cbb70 - Trace ID: 17bc3835-4fdf-48a5-b089-5461514c3000
(node:5756) [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-02-28 17:32: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: aefbade9-a9b1-4f80-9aa2-af2dca133700 Correlation ID: 28957764-9895-4c34-9bc7-bd835fec852b Timestamp: 2026-02-28 17:32:06Z - Correlation ID: 28957764-9895-4c34-9bc7-bd835fec852b - Trace ID: aefbade9-a9b1-4f80-9aa2-af2dca133700
Error getting the secret: invalid_client: 7000222 - [2026-02-28 17:32: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: 150e841f-17d9-4323-baf7-4b22616d3100 Correlation ID: b940c77c-3e6c-4ddd-8f7c-44cd7d4f7aaf Timestamp: 2026-02-28 17:32:06Z - Correlation ID: b940c77c-3e6c-4ddd-8f7c-44cd7d4f7aaf - Trace ID: 150e841f-17d9-4323-baf7-4b22616d3100
Error getting the secret: invalid_client: 7000222 - [2026-02-28 17:32: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: 150e841f-17d9-4323-baf7-4b22666d3100 Correlation ID: 4b8a104e-78f1-4e20-8984-70dafd906f42 Timestamp: 2026-02-28 17:32:07Z - Correlation ID: 4b8a104e-78f1-4e20-8984-70dafd906f42 - Trace ID: 150e841f-17d9-4323-baf7-4b22666d3100
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)