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-02-02 15:24:42Z]: 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: acb0789d-2bd6-4a26-b41b-fa0125a64700 Correlation ID: a0538272-bc94-475a-bb6f-a7b95e859c03 Timestamp: 2026-02-02 15:24:42Z - Correlation ID: a0538272-bc94-475a-bb6f-a7b95e859c03 - Trace ID: acb0789d-2bd6-4a26-b41b-fa0125a64700
(node:5812) [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-02-02 15:24:42Z]: 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: f5dd5585-b59b-4e66-a335-79fb972c3500 Correlation ID: ed3c3e17-b660-467c-bdbf-63acd088fe2c Timestamp: 2026-02-02 15:24:42Z - Correlation ID: ed3c3e17-b660-467c-bdbf-63acd088fe2c - Trace ID: f5dd5585-b59b-4e66-a335-79fb972c3500
Error getting the secret: invalid_client: 7000222 - [2026-02-02 15:24:43Z]: 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: 962ad1e1-f926-4e04-ab2f-0cbef33a5000 Correlation ID: af370483-1acc-4a1f-87cc-1b825bcc58c8 Timestamp: 2026-02-02 15:24:43Z - Correlation ID: af370483-1acc-4a1f-87cc-1b825bcc58c8 - Trace ID: 962ad1e1-f926-4e04-ab2f-0cbef33a5000
Error getting the secret: invalid_client: 7000222 - [2026-02-02 15:24:43Z]: 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: acb0789d-2bd6-4a26-b41b-fa014da64700 Correlation ID: f473490d-e3f4-4098-833f-840fb8b242d9 Timestamp: 2026-02-02 15:24:43Z - Correlation ID: f473490d-e3f4-4098-833f-840fb8b242d9 - Trace ID: acb0789d-2bd6-4a26-b41b-fa014da64700
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)