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-28 23:44:45Z]: 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: d76b30c5-19de-4a27-a26a-72f9d25d2400 Correlation ID: af04e265-266e-4cbd-bbb2-e55696e8001e Timestamp: 2026-03-28 23:44:45Z - Correlation ID: af04e265-266e-4cbd-bbb2-e55696e8001e - Trace ID: d76b30c5-19de-4a27-a26a-72f9d25d2400
(node:2088) [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-28 23:44:45Z]: 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: b9b2bffe-cb8a-4c45-ac3b-2177fe950d00 Correlation ID: 06cd89d8-0a7a-48b1-b6cc-1e9ee5447f86 Timestamp: 2026-03-28 23:44:45Z - Correlation ID: 06cd89d8-0a7a-48b1-b6cc-1e9ee5447f86 - Trace ID: b9b2bffe-cb8a-4c45-ac3b-2177fe950d00
Error getting the secret: invalid_client: 7000222 - [2026-03-28 23:44: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: 109d42dd-2468-4a88-b45f-b9a4c0580f00 Correlation ID: e0adcfda-883f-4fb3-b1d9-3b2be86488d4 Timestamp: 2026-03-28 23:44:46Z - Correlation ID: e0adcfda-883f-4fb3-b1d9-3b2be86488d4 - Trace ID: 109d42dd-2468-4a88-b45f-b9a4c0580f00
Error getting the secret: invalid_client: 7000222 - [2026-03-28 23:44: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: d9bb2247-7540-4bca-b012-1da296670e00 Correlation ID: ae34ef9f-bba9-4404-b5e9-ccdacc8a97c2 Timestamp: 2026-03-28 23:44:46Z - Correlation ID: ae34ef9f-bba9-4404-b5e9-ccdacc8a97c2 - Trace ID: d9bb2247-7540-4bca-b012-1da296670e00
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)