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-09 21:23:52Z]: 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: 486dd75d-c0f6-4cc0-b15b-b476c5b95800 Correlation ID: a5d50b1c-580c-4e43-aefa-febd84dc791a Timestamp: 2026-04-09 21:23:52Z - Correlation ID: a5d50b1c-580c-4e43-aefa-febd84dc791a - Trace ID: 486dd75d-c0f6-4cc0-b15b-b476c5b95800
(node:5072) [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-09 21:23:52Z]: 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: 486dd75d-c0f6-4cc0-b15b-b476cab95800 Correlation ID: c8233ba1-bb41-4e3d-8c4b-c38e0642c162 Timestamp: 2026-04-09 21:23:52Z - Correlation ID: c8233ba1-bb41-4e3d-8c4b-c38e0642c162 - Trace ID: 486dd75d-c0f6-4cc0-b15b-b476cab95800
Error getting the secret: invalid_client: 7000222 - [2026-04-09 21:23:53Z]: 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: a0c7f9ba-12c4-4c3e-baf6-a44895b74d00 Correlation ID: acd75c8f-3615-4eb6-8036-17ad819c27cb Timestamp: 2026-04-09 21:23:53Z - Correlation ID: acd75c8f-3615-4eb6-8036-17ad819c27cb - Trace ID: a0c7f9ba-12c4-4c3e-baf6-a44895b74d00
Error getting the secret: invalid_client: 7000222 - [2026-04-09 21:23:53Z]: 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: 948e6055-805c-41b6-a7e6-6b0dc2805300 Correlation ID: 5b7b0201-e70e-4326-a4c5-4f1053e01ea4 Timestamp: 2026-04-09 21:23:53Z - Correlation ID: 5b7b0201-e70e-4326-a4c5-4f1053e01ea4 - Trace ID: 948e6055-805c-41b6-a7e6-6b0dc2805300
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)