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-02 20:46:06Z]: 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: cf78c78e-0179-4c63-818b-0dc86f432100 Correlation ID: 01eb8e3b-24eb-4827-8e69-d93659274a75 Timestamp: 2026-04-02 20:46:06Z - Correlation ID: 01eb8e3b-24eb-4827-8e69-d93659274a75 - Trace ID: cf78c78e-0179-4c63-818b-0dc86f432100
(node:5096) [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-02 20:46:07Z]: 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: 8dbc5b7b-47eb-42f1-ba21-89de99361f00 Correlation ID: e0a0e8eb-6528-4113-8f52-4e6f1fff48e0 Timestamp: 2026-04-02 20:46:07Z - Correlation ID: e0a0e8eb-6528-4113-8f52-4e6f1fff48e0 - Trace ID: 8dbc5b7b-47eb-42f1-ba21-89de99361f00
Error getting the secret: invalid_client: 7000222 - [2026-04-02 20:46:07Z]: 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: ff454d41-9f18-4f76-9910-c21c5c022500 Correlation ID: d251b63f-6873-4b24-a76f-6ab41a8acba9 Timestamp: 2026-04-02 20:46:07Z - Correlation ID: d251b63f-6873-4b24-a76f-6ab41a8acba9 - Trace ID: ff454d41-9f18-4f76-9910-c21c5c022500
Error getting the secret: invalid_client: 7000222 - [2026-04-02 20:46:07Z]: 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: 6f7ecf72-ff4a-4493-8d8c-7bb9d4332100 Correlation ID: 02be193d-e724-4a5a-8a7d-0fbe863078b5 Timestamp: 2026-04-02 20:46:07Z - Correlation ID: 02be193d-e724-4a5a-8a7d-0fbe863078b5 - Trace ID: 6f7ecf72-ff4a-4493-8d8c-7bb9d4332100
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)