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-28 18:08:22Z]: 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: 9bdcecf5-02d6-4178-b88f-f5f4c6580c00 Correlation ID: 4c21d671-81c0-4275-9ba3-1945417ccdc7 Timestamp: 2026-03-28 18:08:22Z - Correlation ID: 4c21d671-81c0-4275-9ba3-1945417ccdc7 - Trace ID: 9bdcecf5-02d6-4178-b88f-f5f4c6580c00
(node:3304) [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-28 18:08:23Z]: 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: 1c59dab3-d58d-41bd-ab26-9a573d890900 Correlation ID: 5d344657-ef71-4558-b1cc-cdfc7c472c05 Timestamp: 2026-03-28 18:08:23Z - Correlation ID: 5d344657-ef71-4558-b1cc-cdfc7c472c05 - Trace ID: 1c59dab3-d58d-41bd-ab26-9a573d890900
Error getting the secret: invalid_client: 7000222 - [2026-03-28 18:08:23Z]: 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: d71fe011-311d-42ee-aa44-e5b768f00a00 Correlation ID: 7d3a5e43-79ec-48eb-bd04-5b5588b5517e Timestamp: 2026-03-28 18:08:23Z - Correlation ID: 7d3a5e43-79ec-48eb-bd04-5b5588b5517e - Trace ID: d71fe011-311d-42ee-aa44-e5b768f00a00
Error getting the secret: invalid_client: 7000222 - [2026-03-28 18:08:23Z]: 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: 2fc27ad7-8fb9-4809-9a85-97ab57e50700 Correlation ID: a34023eb-70da-46ef-b8d9-0f0acbd15644 Timestamp: 2026-03-28 18:08:23Z - Correlation ID: a34023eb-70da-46ef-b8d9-0f0acbd15644 - Trace ID: 2fc27ad7-8fb9-4809-9a85-97ab57e50700
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)