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-28 01:13:58Z]: 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: a862635f-74a7-45f0-bd1d-b1e0ddb14700 Correlation ID: 1a698ba5-f383-4376-a6f0-5314fe55fc6a Timestamp: 2026-04-28 01:13:58Z - Correlation ID: 1a698ba5-f383-4376-a6f0-5314fe55fc6a - Trace ID: a862635f-74a7-45f0-bd1d-b1e0ddb14700
(node:4520) [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-28 01:13:58Z]: 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: d9018d09-6fd7-4625-aa58-f443f2b94700 Correlation ID: 58899ce9-6f45-4c4d-9ed4-572637c68e89 Timestamp: 2026-04-28 01:13:58Z - Correlation ID: 58899ce9-6f45-4c4d-9ed4-572637c68e89 - Trace ID: d9018d09-6fd7-4625-aa58-f443f2b94700
Error getting the secret: invalid_client: 7000222 - [2026-04-28 01:13:59Z]: 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: ebee91f6-4533-41fd-9154-6d9d07100500 Correlation ID: 7facb640-1d59-4c00-b08a-bd0498f87545 Timestamp: 2026-04-28 01:13:59Z - Correlation ID: 7facb640-1d59-4c00-b08a-bd0498f87545 - Trace ID: ebee91f6-4533-41fd-9154-6d9d07100500
Error getting the secret: invalid_client: 7000222 - [2026-04-28 01:13:59Z]: 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: ebee91f6-4533-41fd-9154-6d9d14100500 Correlation ID: c03d8c45-231a-431e-ba1f-6a2b88a3455c Timestamp: 2026-04-28 01:13:59Z - Correlation ID: c03d8c45-231a-431e-ba1f-6a2b88a3455c - Trace ID: ebee91f6-4533-41fd-9154-6d9d14100500
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)