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-03-20 20:59:41Z]: 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: 9f0c4ff8-2117-4254-86ea-a1de56a15100 Correlation ID: 40faff63-f164-40c1-97b6-39aec19fd212 Timestamp: 2026-03-20 20:59:41Z - Correlation ID: 40faff63-f164-40c1-97b6-39aec19fd212 - Trace ID: 9f0c4ff8-2117-4254-86ea-a1de56a15100
(node:1716) [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-03-20 20:59:41Z]: 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: 7159f599-8a29-44a6-aaab-694162bb1400 Correlation ID: 0f65412d-70cb-4428-a296-06b7c37f9fd8 Timestamp: 2026-03-20 20:59:41Z - Correlation ID: 0f65412d-70cb-4428-a296-06b7c37f9fd8 - Trace ID: 7159f599-8a29-44a6-aaab-694162bb1400
Error getting the secret: invalid_client: 7000222 - [2026-03-20 20:59:41Z]: 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: 480bea2b-c5b0-4411-9ba8-87a7688b6200 Correlation ID: e2d604a0-679d-4a25-93ef-356bb195f59f Timestamp: 2026-03-20 20:59:41Z - Correlation ID: e2d604a0-679d-4a25-93ef-356bb195f59f - Trace ID: 480bea2b-c5b0-4411-9ba8-87a7688b6200
Error getting the secret: invalid_client: 7000222 - [2026-03-20 20:59:42Z]: 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: ba0c2a0d-a0a4-4865-a778-a250d8e36600 Correlation ID: a5cec50a-6986-411c-b689-cbadf692c251 Timestamp: 2026-03-20 20:59:42Z - Correlation ID: a5cec50a-6986-411c-b689-cbadf692c251 - Trace ID: ba0c2a0d-a0a4-4865-a778-a250d8e36600
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)