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-01-02 22:16:08Z]: 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: 8fa47e00-5ecd-4121-b55a-29e19f497301 Correlation ID: 78b31592-6065-471a-bfbb-03726c52e623 Timestamp: 2026-01-02 22:16:08Z - Correlation ID: 78b31592-6065-471a-bfbb-03726c52e623 - Trace ID: 8fa47e00-5ecd-4121-b55a-29e19f497301
(node:1960) [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-01-02 22:16:08Z]: 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: e6b18ab5-0cca-4a94-a0c5-ed2377caab00 Correlation ID: ebb8a91b-6320-4532-b174-c76b00d61792 Timestamp: 2026-01-02 22:16:08Z - Correlation ID: ebb8a91b-6320-4532-b174-c76b00d61792 - Trace ID: e6b18ab5-0cca-4a94-a0c5-ed2377caab00
Error getting the secret: invalid_client: 7000222 - [2026-01-02 22:16:08Z]: 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: 021a85d1-21de-49c9-a019-66911ed37500 Correlation ID: 4072f4c3-3b98-4e5b-812b-59751a11a9b2 Timestamp: 2026-01-02 22:16:08Z - Correlation ID: 4072f4c3-3b98-4e5b-812b-59751a11a9b2 - Trace ID: 021a85d1-21de-49c9-a019-66911ed37500
Error getting the secret: invalid_client: 7000222 - [2026-01-02 22:16:09Z]: 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: 6f17c18e-5cb8-4a50-9a92-db5651c55201 Correlation ID: d3112567-04fa-4e8e-ba1b-b5b3424b8272 Timestamp: 2026-01-02 22:16:09Z - Correlation ID: d3112567-04fa-4e8e-ba1b-b5b3424b8272 - Trace ID: 6f17c18e-5cb8-4a50-9a92-db5651c55201
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)