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-26 21:48:38Z]: 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: c1a5eec6-b0cc-4f4b-977f-57be252d2600 Correlation ID: 6f413139-15f2-498d-b5dd-a15f93bb9b0d Timestamp: 2026-03-26 21:48:38Z - Correlation ID: 6f413139-15f2-498d-b5dd-a15f93bb9b0d - Trace ID: c1a5eec6-b0cc-4f4b-977f-57be252d2600
(node:2600) [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-26 21:48:38Z]: 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: e325e0dd-09c2-4e20-8726-a46c58182700 Correlation ID: be007486-d6e2-4370-a95a-932fdeb6a087 Timestamp: 2026-03-26 21:48:38Z - Correlation ID: be007486-d6e2-4370-a95a-932fdeb6a087 - Trace ID: e325e0dd-09c2-4e20-8726-a46c58182700
Error getting the secret: invalid_client: 7000222 - [2026-03-26 21:48:38Z]: 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: 5e5bf5bc-bcef-4547-b7b5-b81c687e2300 Correlation ID: 93cb9e0d-ec13-4d2b-a49c-6f36d58190bf Timestamp: 2026-03-26 21:48:38Z - Correlation ID: 93cb9e0d-ec13-4d2b-a49c-6f36d58190bf - Trace ID: 5e5bf5bc-bcef-4547-b7b5-b81c687e2300
Error getting the secret: invalid_client: 7000222 - [2026-03-26 21:48:38Z]: 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: ead240cc-3dc7-4898-977f-980833a90a00 Correlation ID: 54205e49-477c-4897-8d56-2c3327691e4a Timestamp: 2026-03-26 21:48:38Z - Correlation ID: 54205e49-477c-4897-8d56-2c3327691e4a - Trace ID: ead240cc-3dc7-4898-977f-980833a90a00
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)