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 07:17:19Z]: 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: 9b2e797c-61c6-4242-b2b3-2a4b6c0b2d00 Correlation ID: fe04a451-9b29-4b88-808e-5b15f771812d Timestamp: 2026-03-27 07:17:19Z - Correlation ID: fe04a451-9b29-4b88-808e-5b15f771812d - Trace ID: 9b2e797c-61c6-4242-b2b3-2a4b6c0b2d00
(node:5572) [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 07:17:19Z]: 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: ac6295ec-967d-4ba3-b27d-d43f03c10900 Correlation ID: bac23e30-8db9-4f02-8563-1a2d373ee7d5 Timestamp: 2026-03-27 07:17:19Z - Correlation ID: bac23e30-8db9-4f02-8563-1a2d373ee7d5 - Trace ID: ac6295ec-967d-4ba3-b27d-d43f03c10900
Error getting the secret: invalid_client: 7000222 - [2026-03-27 07:17:20Z]: 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: feb7ab48-2350-484d-8435-cb0a692d4500 Correlation ID: 67dbf37f-3e29-4a8b-a10d-c74cc731cf14 Timestamp: 2026-03-27 07:17:20Z - Correlation ID: 67dbf37f-3e29-4a8b-a10d-c74cc731cf14 - Trace ID: feb7ab48-2350-484d-8435-cb0a692d4500
Error getting the secret: invalid_client: 7000222 - [2026-03-27 07:17:20Z]: 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: 1a9c393a-2fa4-4374-8f90-d68817e92a00 Correlation ID: 41d72491-4a31-4b38-9800-2676866396b0 Timestamp: 2026-03-27 07:17:20Z - Correlation ID: 41d72491-4a31-4b38-9800-2676866396b0 - Trace ID: 1a9c393a-2fa4-4374-8f90-d68817e92a00
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)