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 07:32:04Z]: 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: 09d3603e-4728-4a1a-9ba2-f9ab85341300 Correlation ID: 735fdb4c-f52c-4c66-a057-5397d79fad00 Timestamp: 2026-04-02 07:32:04Z - Correlation ID: 735fdb4c-f52c-4c66-a057-5397d79fad00 - Trace ID: 09d3603e-4728-4a1a-9ba2-f9ab85341300
(node:1208) [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 07:32:04Z]: 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: 3117babd-dc93-41f7-beff-a1ee8f6f1900 Correlation ID: 111d6eb8-09b0-428a-ae37-377eabf0fd00 Timestamp: 2026-04-02 07:32:04Z - Correlation ID: 111d6eb8-09b0-428a-ae37-377eabf0fd00 - Trace ID: 3117babd-dc93-41f7-beff-a1ee8f6f1900
Error getting the secret: invalid_client: 7000222 - [2026-04-02 07:32:04Z]: 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: 3117babd-dc93-41f7-beff-a1ee916f1900 Correlation ID: 753460e6-fc4d-40bf-9743-8651df06be91 Timestamp: 2026-04-02 07:32:04Z - Correlation ID: 753460e6-fc4d-40bf-9743-8651df06be91 - Trace ID: 3117babd-dc93-41f7-beff-a1ee916f1900
Error getting the secret: invalid_client: 7000222 - [2026-04-02 07:32:04Z]: 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: 7bb6e04b-7834-4fee-b2ee-e44040421500 Correlation ID: 23ffbdf3-9da4-4711-b18e-a5618c765ae2 Timestamp: 2026-04-02 07:32:04Z - Correlation ID: 23ffbdf3-9da4-4711-b18e-a5618c765ae2 - Trace ID: 7bb6e04b-7834-4fee-b2ee-e44040421500
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)