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-20 18:26:24Z]: 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: 718f0556-9016-4e28-9e98-060b3fd80c00 Correlation ID: c62bd9bb-7db6-46b7-8949-c4e597c458d4 Timestamp: 2026-04-20 18:26:24Z - Correlation ID: c62bd9bb-7db6-46b7-8949-c4e597c458d4 - Trace ID: 718f0556-9016-4e28-9e98-060b3fd80c00
(node:4044) [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-20 18:26:24Z]: 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: bf68634c-d486-44f8-928d-c8f6fa490d00 Correlation ID: 15d261c3-1ecb-4064-9ce4-b4c6c7834c1d Timestamp: 2026-04-20 18:26:24Z - Correlation ID: 15d261c3-1ecb-4064-9ce4-b4c6c7834c1d - Trace ID: bf68634c-d486-44f8-928d-c8f6fa490d00
Error getting the secret: invalid_client: 7000222 - [2026-04-20 18:26:24Z]: 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: 4088e004-01a3-4035-accc-32eec4791000 Correlation ID: 29097faf-2691-4a97-9d95-aee848d0be05 Timestamp: 2026-04-20 18:26:24Z - Correlation ID: 29097faf-2691-4a97-9d95-aee848d0be05 - Trace ID: 4088e004-01a3-4035-accc-32eec4791000
Error getting the secret: invalid_client: 7000222 - [2026-04-20 18:26:24Z]: 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: 0ba0f64b-f483-44d8-a055-ce383ed11300 Correlation ID: 6c774aee-ddc5-43bd-ba99-4f2edd47a332 Timestamp: 2026-04-20 18:26:24Z - Correlation ID: 6c774aee-ddc5-43bd-ba99-4f2edd47a332 - Trace ID: 0ba0f64b-f483-44d8-a055-ce383ed11300
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)