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-24 09:04:46Z]: 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: d5c54886-dd65-4083-9525-6b634a3f5300 Correlation ID: 01b79209-fa31-48c2-9ea6-fbef10d74f43 Timestamp: 2026-04-24 09:04:46Z - Correlation ID: 01b79209-fa31-48c2-9ea6-fbef10d74f43 - Trace ID: d5c54886-dd65-4083-9525-6b634a3f5300
(node:5484) [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-24 09:04:47Z]: 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: aedb047f-3c83-4820-9a7a-e1d6d42b0700 Correlation ID: 53f598ff-dda4-4195-9acd-08d2f3c70dbf Timestamp: 2026-04-24 09:04:47Z - Correlation ID: 53f598ff-dda4-4195-9acd-08d2f3c70dbf - Trace ID: aedb047f-3c83-4820-9a7a-e1d6d42b0700
Error getting the secret: invalid_client: 7000222 - [2026-04-24 09:04:47Z]: 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: 4193e922-e4a9-408b-8695-dfaa4ac67300 Correlation ID: 293a0e4a-aa1f-449b-af46-bf7691cf9967 Timestamp: 2026-04-24 09:04:47Z - Correlation ID: 293a0e4a-aa1f-449b-af46-bf7691cf9967 - Trace ID: 4193e922-e4a9-408b-8695-dfaa4ac67300
Error getting the secret: invalid_client: 7000222 - [2026-04-24 09:04:47Z]: 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: d234e67e-eb44-453e-8468-4beb17f41300 Correlation ID: 510dcb24-07c3-4838-ac45-da564676a4f3 Timestamp: 2026-04-24 09:04:47Z - Correlation ID: 510dcb24-07c3-4838-ac45-da564676a4f3 - Trace ID: d234e67e-eb44-453e-8468-4beb17f41300
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)