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-05-02 10:10:41Z]: 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: c6eb6835-1a50-43ec-b32b-63c4bf303900 Correlation ID: 336ef0fc-82f9-41e7-a9c9-55bf35eb7fd3 Timestamp: 2026-05-02 10:10:41Z - Correlation ID: 336ef0fc-82f9-41e7-a9c9-55bf35eb7fd3 - Trace ID: c6eb6835-1a50-43ec-b32b-63c4bf303900
(node:5648) [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-05-02 10:10:41Z]: 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: 6be1b902-307a-416d-a67e-eae62cbf3600 Correlation ID: dbfac561-858e-46e6-a453-db26c9f52afa Timestamp: 2026-05-02 10:10:41Z - Correlation ID: dbfac561-858e-46e6-a453-db26c9f52afa - Trace ID: 6be1b902-307a-416d-a67e-eae62cbf3600
Error getting the secret: invalid_client: 7000222 - [2026-05-02 10:10:41Z]: 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: 9c9aafa9-ed6a-46b1-89fa-6151b86f2c00 Correlation ID: 66c1dd61-b0cf-4483-94ac-b28dc50cbddf Timestamp: 2026-05-02 10:10:41Z - Correlation ID: 66c1dd61-b0cf-4483-94ac-b28dc50cbddf - Trace ID: 9c9aafa9-ed6a-46b1-89fa-6151b86f2c00
Error getting the secret: invalid_client: 7000222 - [2026-05-02 10:10: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: 3bcdb388-4a4b-4c01-b3a9-71bfa2e13000 Correlation ID: e7c2493b-4447-49ca-a2a9-1609b1932586 Timestamp: 2026-05-02 10:10:42Z - Correlation ID: e7c2493b-4447-49ca-a2a9-1609b1932586 - Trace ID: 3bcdb388-4a4b-4c01-b3a9-71bfa2e13000
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)