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-08 21:58: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: 463c0681-418a-4e53-b378-7a8c2f6e3800 Correlation ID: 73fd762d-6e9e-46ad-bdf8-7b64279acce9 Timestamp: 2026-04-08 21:58:44Z - Correlation ID: 73fd762d-6e9e-46ad-bdf8-7b64279acce9 - Trace ID: 463c0681-418a-4e53-b378-7a8c2f6e3800
(node:5872) [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-08 21:58: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: 0cfada7a-dcbe-4db7-a144-dae440710f00 Correlation ID: 3ba72d3c-891e-4fb5-8ddd-3f03ce825b4f Timestamp: 2026-04-08 21:58:45Z - Correlation ID: 3ba72d3c-891e-4fb5-8ddd-3f03ce825b4f - Trace ID: 0cfada7a-dcbe-4db7-a144-dae440710f00
Error getting the secret: invalid_client: 7000222 - [2026-04-08 21:58: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: 4c63ecde-00b1-4ad8-9e32-3c27adfd2600 Correlation ID: 02005848-496f-4729-bead-c53016adaea6 Timestamp: 2026-04-08 21:58:45Z - Correlation ID: 02005848-496f-4729-bead-c53016adaea6 - Trace ID: 4c63ecde-00b1-4ad8-9e32-3c27adfd2600
Error getting the secret: invalid_client: 7000222 - [2026-04-08 21:58: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: 61f6db5e-318c-4f4c-9619-1e485f051000 Correlation ID: d883adce-39a6-45d7-b3a6-bc304063d133 Timestamp: 2026-04-08 21:58:45Z - Correlation ID: d883adce-39a6-45d7-b3a6-bc304063d133 - Trace ID: 61f6db5e-318c-4f4c-9619-1e485f051000
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)