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-24 18:23: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: d1005c21-3c50-4594-8dcb-dd81c32f5500 Correlation ID: cc8b2d4e-25da-4573-9820-a38c9b38c4c6 Timestamp: 2026-03-24 18:23:44Z - Correlation ID: cc8b2d4e-25da-4573-9820-a38c9b38c4c6 - Trace ID: d1005c21-3c50-4594-8dcb-dd81c32f5500
(node:4552) [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-24 18:23: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: e8c97249-d3a2-4a57-a482-eb1c86ba0b00 Correlation ID: 89bf305d-5d63-4adb-8640-a09cf60e4739 Timestamp: 2026-03-24 18:23:44Z - Correlation ID: 89bf305d-5d63-4adb-8640-a09cf60e4739 - Trace ID: e8c97249-d3a2-4a57-a482-eb1c86ba0b00
Error getting the secret: invalid_client: 7000222 - [2026-03-24 18:23: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: 4f58e7dd-d933-4aa0-b244-76e19c194700 Correlation ID: 1ed537ef-8861-4e4c-af5e-03b5af429131 Timestamp: 2026-03-24 18:23:44Z - Correlation ID: 1ed537ef-8861-4e4c-af5e-03b5af429131 - Trace ID: 4f58e7dd-d933-4aa0-b244-76e19c194700
Error getting the secret: invalid_client: 7000222 - [2026-03-24 18:23: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: 4d790ef0-1106-4866-862e-dbbed74f0700 Correlation ID: d09ad4ed-2729-44b9-b3fc-089aa2ea3bbb Timestamp: 2026-03-24 18:23:44Z - Correlation ID: d09ad4ed-2729-44b9-b3fc-089aa2ea3bbb - Trace ID: 4d790ef0-1106-4866-862e-dbbed74f0700
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)