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-27 03:32:44Z]: 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: 87dad98b-c3a4-49fd-8bc1-9494709e1e00 Correlation ID: da5ff77b-ad73-485f-997a-72e1b4d8d3ef Timestamp: 2026-03-27 03:32:44Z - Correlation ID: da5ff77b-ad73-485f-997a-72e1b4d8d3ef - Trace ID: 87dad98b-c3a4-49fd-8bc1-9494709e1e00
(node:5416) [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-27 03:32:44Z]: 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: 21f57b6e-9bf8-4d3a-9c8e-c5769c092c00 Correlation ID: 6732e6ab-3193-4f5a-81ef-4ff4ac27aa7d Timestamp: 2026-03-27 03:32:44Z - Correlation ID: 6732e6ab-3193-4f5a-81ef-4ff4ac27aa7d - Trace ID: 21f57b6e-9bf8-4d3a-9c8e-c5769c092c00
Error getting the secret: invalid_client: 7000222 - [2026-03-27 03:32:44Z]: 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: a31e9cef-e046-484a-82ad-621582a23000 Correlation ID: 11de6725-4f6a-4713-9b65-008594ed682e Timestamp: 2026-03-27 03:32:44Z - Correlation ID: 11de6725-4f6a-4713-9b65-008594ed682e - Trace ID: a31e9cef-e046-484a-82ad-621582a23000
Error getting the secret: invalid_client: 7000222 - [2026-03-27 03:32:44Z]: 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: 89e3cfbc-9bd8-4f0c-918a-9270ead23100 Correlation ID: 658c53fd-7181-49b9-b26e-e7ff3582a26e Timestamp: 2026-03-27 03:32:44Z - Correlation ID: 658c53fd-7181-49b9-b26e-e7ff3582a26e - Trace ID: 89e3cfbc-9bd8-4f0c-918a-9270ead23100
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)