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-20 00:42: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: 8f5ce838-d011-4db2-9755-f5a8063b5400 Correlation ID: 454dea20-cd85-4b5d-88bf-b178ad255c7f Timestamp: 2026-03-20 00:42:45Z - Correlation ID: 454dea20-cd85-4b5d-88bf-b178ad255c7f - Trace ID: 8f5ce838-d011-4db2-9755-f5a8063b5400
(node:1824) [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-20 00:42: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: 345b005e-ad4d-42df-9b1d-b9591b224f00 Correlation ID: 932a3fc9-c39c-4270-acad-8e84a3c638d7 Timestamp: 2026-03-20 00:42:46Z - Correlation ID: 932a3fc9-c39c-4270-acad-8e84a3c638d7 - Trace ID: 345b005e-ad4d-42df-9b1d-b9591b224f00
Error getting the secret: invalid_client: 7000222 - [2026-03-20 00:42: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: 66eff8ea-dca0-4afd-989b-f2ea33844a00 Correlation ID: d78059df-bbb0-4b19-b5a9-6f1a6006a568 Timestamp: 2026-03-20 00:42:46Z - Correlation ID: d78059df-bbb0-4b19-b5a9-6f1a6006a568 - Trace ID: 66eff8ea-dca0-4afd-989b-f2ea33844a00
Error getting the secret: invalid_client: 7000222 - [2026-03-20 00:42: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: f6c9ed0e-d930-4d30-a9e0-2f536e854c00 Correlation ID: abd5cee6-d8b0-4e76-9cd2-34d8f6751d98 Timestamp: 2026-03-20 00:42:46Z - Correlation ID: abd5cee6-d8b0-4e76-9cd2-34d8f6751d98 - Trace ID: f6c9ed0e-d930-4d30-a9e0-2f536e854c00
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)