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-02-28 11:35:47Z]: 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: 24820e43-5120-491f-8514-427f30403300 Correlation ID: 7c0ff428-2fbb-4d20-8271-f7d6d4b309e2 Timestamp: 2026-02-28 11:35:47Z - Correlation ID: 7c0ff428-2fbb-4d20-8271-f7d6d4b309e2 - Trace ID: 24820e43-5120-491f-8514-427f30403300
(node:5616) [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-02-28 11:35:47Z]: 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: 24820e43-5120-491f-8514-427f3d403300 Correlation ID: 670073ed-63b4-45e4-ab65-8a3eee67983f Timestamp: 2026-02-28 11:35:47Z - Correlation ID: 670073ed-63b4-45e4-ab65-8a3eee67983f - Trace ID: 24820e43-5120-491f-8514-427f3d403300
Error getting the secret: invalid_client: 7000222 - [2026-02-28 11:35:48Z]: 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: 6de46722-43e5-4764-af4e-f4fdf0e73a00 Correlation ID: 007cdd12-5ceb-4585-8c04-94141620986d Timestamp: 2026-02-28 11:35:48Z - Correlation ID: 007cdd12-5ceb-4585-8c04-94141620986d - Trace ID: 6de46722-43e5-4764-af4e-f4fdf0e73a00
Error getting the secret: invalid_client: 7000222 - [2026-02-28 11:35:48Z]: 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: 1230d85f-3e40-4ed8-9f1b-2979979b3b00 Correlation ID: bc21548f-0add-4d08-af5d-aebc3de538ab Timestamp: 2026-02-28 11:35:48Z - Correlation ID: bc21548f-0add-4d08-af5d-aebc3de538ab - Trace ID: 1230d85f-3e40-4ed8-9f1b-2979979b3b00
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)