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-13 12:36:19Z]: 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: 638e62f6-b786-48a5-b237-4b63286f0200 Correlation ID: b5c97f95-83c4-4e7d-8e46-9815004d6a0a Timestamp: 2026-04-13 12:36:19Z - Correlation ID: b5c97f95-83c4-4e7d-8e46-9815004d6a0a - Trace ID: 638e62f6-b786-48a5-b237-4b63286f0200
(node:3196) [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-13 12:36:20Z]: 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: e623cdfb-0101-40c4-abb4-16eabc222100 Correlation ID: f9780bd8-077c-4603-9f28-9d1a15dadc52 Timestamp: 2026-04-13 12:36:20Z - Correlation ID: f9780bd8-077c-4603-9f28-9d1a15dadc52 - Trace ID: e623cdfb-0101-40c4-abb4-16eabc222100
Error getting the secret: invalid_client: 7000222 - [2026-04-13 12:36:20Z]: 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: 09466c68-4d20-4eef-b3f8-322d4e640a00 Correlation ID: 1869d982-be9f-4634-ac56-3524b8b1d9d7 Timestamp: 2026-04-13 12:36:20Z - Correlation ID: 1869d982-be9f-4634-ac56-3524b8b1d9d7 - Trace ID: 09466c68-4d20-4eef-b3f8-322d4e640a00
Error getting the secret: invalid_client: 7000222 - [2026-04-13 12:36:20Z]: 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: a3ca2ee4-282f-447a-8cc1-dd5638e12200 Correlation ID: ce28c286-9b11-4211-9c30-a4ede8472fd0 Timestamp: 2026-04-13 12:36:20Z - Correlation ID: ce28c286-9b11-4211-9c30-a4ede8472fd0 - Trace ID: a3ca2ee4-282f-447a-8cc1-dd5638e12200
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)