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-29 16:48:02Z]: 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: 7512f999-bb9d-4046-8cf3-9ae396ff2100 Correlation ID: f53ac966-254a-4940-9982-ca0666200d01 Timestamp: 2026-04-29 16:48:02Z - Correlation ID: f53ac966-254a-4940-9982-ca0666200d01 - Trace ID: 7512f999-bb9d-4046-8cf3-9ae396ff2100
(node:2136) [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-29 16:48:02Z]: 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: 286badd6-6106-43da-8b6b-0b67b16b3200 Correlation ID: b25ae9c5-9ad5-4c0f-b608-b37a015f685f Timestamp: 2026-04-29 16:48:02Z - Correlation ID: b25ae9c5-9ad5-4c0f-b608-b37a015f685f - Trace ID: 286badd6-6106-43da-8b6b-0b67b16b3200
Error getting the secret: invalid_client: 7000222 - [2026-04-29 16:48:02Z]: 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: a80c2939-4d93-4f27-9d4b-d970360e8e00 Correlation ID: 832fae40-3061-47a9-b4e7-86a002631517 Timestamp: 2026-04-29 16:48:02Z - Correlation ID: 832fae40-3061-47a9-b4e7-86a002631517 - Trace ID: a80c2939-4d93-4f27-9d4b-d970360e8e00
Error getting the secret: invalid_client: 7000222 - [2026-04-29 16:48:02Z]: 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: 5a617a66-81bd-4536-b9ac-1ae333303300 Correlation ID: 47337147-6b61-4a10-8463-d3b344309a8f Timestamp: 2026-04-29 16:48:02Z - Correlation ID: 47337147-6b61-4a10-8463-d3b344309a8f - Trace ID: 5a617a66-81bd-4536-b9ac-1ae333303300
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)