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-23 21:42:00Z]: 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: 8703bd80-c984-4184-ad2e-96aeba651100 Correlation ID: d19cbaa7-c7bb-4554-af4d-ce8ffb9c73ed Timestamp: 2026-03-23 21:42:00Z - Correlation ID: d19cbaa7-c7bb-4554-af4d-ce8ffb9c73ed - Trace ID: 8703bd80-c984-4184-ad2e-96aeba651100
(node:5472) [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-23 21:42:01Z]: 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: 8703bd80-c984-4184-ad2e-96aec5651100 Correlation ID: e59e1a4a-8363-4581-9de8-c1d5b0664b84 Timestamp: 2026-03-23 21:42:01Z - Correlation ID: e59e1a4a-8363-4581-9de8-c1d5b0664b84 - Trace ID: 8703bd80-c984-4184-ad2e-96aec5651100
Error getting the secret: invalid_client: 7000222 - [2026-03-23 21:42:01Z]: 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: 462c5c24-6af6-4083-bc0b-b8660dab3900 Correlation ID: 5081ee60-a256-476d-99c3-1db9dda47a45 Timestamp: 2026-03-23 21:42:01Z - Correlation ID: 5081ee60-a256-476d-99c3-1db9dda47a45 - Trace ID: 462c5c24-6af6-4083-bc0b-b8660dab3900
Error getting the secret: invalid_client: 7000222 - [2026-03-23 21:42:01Z]: 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: c9f3ff8f-1dd1-4934-a2cd-b3c415cf3900 Correlation ID: 1a263fd4-70a2-4a0d-8250-28778609cdce Timestamp: 2026-03-23 21:42:01Z - Correlation ID: 1a263fd4-70a2-4a0d-8250-28778609cdce - Trace ID: c9f3ff8f-1dd1-4934-a2cd-b3c415cf3900
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)