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-05-05 22:57: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: dd1e1f2d-7d76-4462-903f-91c84cb20500 Correlation ID: 4c9f9868-d9bd-4acd-9b6c-fb97df10565f Timestamp: 2026-05-05 22:57:46Z - Correlation ID: 4c9f9868-d9bd-4acd-9b6c-fb97df10565f - Trace ID: dd1e1f2d-7d76-4462-903f-91c84cb20500
(node:504) [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-05-05 22:57: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: 88740abb-42dc-428d-be27-20012d830400 Correlation ID: d3abfc99-2a25-4f8a-b82b-b3570f273d58 Timestamp: 2026-05-05 22:57:46Z - Correlation ID: d3abfc99-2a25-4f8a-b82b-b3570f273d58 - Trace ID: 88740abb-42dc-428d-be27-20012d830400
Error getting the secret: invalid_client: 7000222 - [2026-05-05 22:57: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: eb653982-b292-4f80-95c9-f5db19840400 Correlation ID: 9cba60ec-e43e-4f86-83ff-a96c3e5412db Timestamp: 2026-05-05 22:57:47Z - Correlation ID: 9cba60ec-e43e-4f86-83ff-a96c3e5412db - Trace ID: eb653982-b292-4f80-95c9-f5db19840400
Error getting the secret: invalid_client: 7000222 - [2026-05-05 22:57: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: da966e9d-2a03-4b6f-aa8b-5c7264ad0200 Correlation ID: 25ad91a0-f0bb-4b62-a2c1-2e580c49a634 Timestamp: 2026-05-05 22:57:47Z - Correlation ID: 25ad91a0-f0bb-4b62-a2c1-2e580c49a634 - Trace ID: da966e9d-2a03-4b6f-aa8b-5c7264ad0200
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)