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-24 21:44:04Z]: 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: 8a1e663f-5df8-4e22-97e2-bc5879bf2800 Correlation ID: 450c13e5-bd0c-4724-ade4-fe9cb661ef85 Timestamp: 2026-03-24 21:44:04Z - Correlation ID: 450c13e5-bd0c-4724-ade4-fe9cb661ef85 - Trace ID: 8a1e663f-5df8-4e22-97e2-bc5879bf2800
(node:2024) [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-24 21:44:05Z]: 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: da712dbf-40e0-4d42-9678-43e6fafa4c00 Correlation ID: d1bef857-3ec2-44a8-a686-9aca5c6aef0b Timestamp: 2026-03-24 21:44:05Z - Correlation ID: d1bef857-3ec2-44a8-a686-9aca5c6aef0b - Trace ID: da712dbf-40e0-4d42-9678-43e6fafa4c00
Error getting the secret: invalid_client: 7000222 - [2026-03-24 21:44:05Z]: 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: f27b4134-ea52-45dd-9966-426aa1c84200 Correlation ID: d68b069d-143b-4e1b-b25a-1d1ff44e5996 Timestamp: 2026-03-24 21:44:05Z - Correlation ID: d68b069d-143b-4e1b-b25a-1d1ff44e5996 - Trace ID: f27b4134-ea52-45dd-9966-426aa1c84200
Error getting the secret: invalid_client: 7000222 - [2026-03-24 21:44:05Z]: 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: ddead5b0-f103-454b-9334-1790665d0f00 Correlation ID: 250eea33-15a0-4349-ab36-6e0a4f68ccaf Timestamp: 2026-03-24 21:44:05Z - Correlation ID: 250eea33-15a0-4349-ab36-6e0a4f68ccaf - Trace ID: ddead5b0-f103-454b-9334-1790665d0f00
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)