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-10 21:28:38Z]: 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: 1d97b01b-f18e-465e-a6b4-ee0c95ca1400 Correlation ID: 413714bd-3514-4d27-8d7c-25315a5db280 Timestamp: 2026-04-10 21:28:38Z - Correlation ID: 413714bd-3514-4d27-8d7c-25315a5db280 - Trace ID: 1d97b01b-f18e-465e-a6b4-ee0c95ca1400
(node:4196) [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-10 21:28:38Z]: 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: 5ef19a2d-6c8d-4d35-b2d0-a20ccc160300 Correlation ID: ef7edf4c-0882-4e40-bba0-b2af2c8140ec Timestamp: 2026-04-10 21:28:38Z - Correlation ID: ef7edf4c-0882-4e40-bba0-b2af2c8140ec - Trace ID: 5ef19a2d-6c8d-4d35-b2d0-a20ccc160300
Error getting the secret: invalid_client: 7000222 - [2026-04-10 21:28:38Z]: 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: d6ce4adf-5e17-4cf1-8855-26cb21200600 Correlation ID: 7bf0353d-b180-4a24-9587-cb7e2b7675db Timestamp: 2026-04-10 21:28:38Z - Correlation ID: 7bf0353d-b180-4a24-9587-cb7e2b7675db - Trace ID: d6ce4adf-5e17-4cf1-8855-26cb21200600
Error getting the secret: invalid_client: 7000222 - [2026-04-10 21:28:39Z]: 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: 72fb46e2-12bf-4e3d-b6e9-2f4bf2760100 Correlation ID: 7f9f783e-a65a-40d9-b3e5-fe825d8dee1f Timestamp: 2026-04-10 21:28:39Z - Correlation ID: 7f9f783e-a65a-40d9-b3e5-fe825d8dee1f - Trace ID: 72fb46e2-12bf-4e3d-b6e9-2f4bf2760100
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)