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-03-19 18:16:44Z]: 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: 8763952f-81a1-4f7b-8402-fe731bf91d00 Correlation ID: 6ddcee53-08ef-485c-8203-4ad31bc4e42a Timestamp: 2026-03-19 18:16:44Z - Correlation ID: 6ddcee53-08ef-485c-8203-4ad31bc4e42a - Trace ID: 8763952f-81a1-4f7b-8402-fe731bf91d00
(node:2008) [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-03-19 18:16:44Z]: 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: a5d0dde5-77a1-42cd-9d88-8f419b924900 Correlation ID: a10f3cec-0612-4c52-9fc8-bd224d69a49c Timestamp: 2026-03-19 18:16:44Z - Correlation ID: a10f3cec-0612-4c52-9fc8-bd224d69a49c - Trace ID: a5d0dde5-77a1-42cd-9d88-8f419b924900
Error getting the secret: invalid_client: 7000222 - [2026-03-19 18:16:45Z]: 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: 09efd92f-6f79-4b34-9ac3-69b373113100 Correlation ID: 336e4d32-a0ea-4554-a0c7-b26b134bd4b4 Timestamp: 2026-03-19 18:16:45Z - Correlation ID: 336e4d32-a0ea-4554-a0c7-b26b134bd4b4 - Trace ID: 09efd92f-6f79-4b34-9ac3-69b373113100
Error getting the secret: invalid_client: 7000222 - [2026-03-19 18:16:45Z]: 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: 929349af-78cf-460e-9786-a148638c2300 Correlation ID: 12fbfc36-1583-4a29-88d8-29caf43814ed Timestamp: 2026-03-19 18:16:45Z - Correlation ID: 12fbfc36-1583-4a29-88d8-29caf43814ed - Trace ID: 929349af-78cf-460e-9786-a148638c2300
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)