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-04 08:30:26Z]: 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: 232be763-3f2d-4298-8cf1-e44cfd990f00 Correlation ID: ce0ee249-774a-4f1f-a9ab-4747a3f1ce20 Timestamp: 2026-03-04 08:30:26Z - Correlation ID: ce0ee249-774a-4f1f-a9ab-4747a3f1ce20 - Trace ID: 232be763-3f2d-4298-8cf1-e44cfd990f00
(node:3944) [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-04 08:30:26Z]: 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: bb7ef67b-5b02-4c89-a856-98b0e8c12b00 Correlation ID: 74c3355b-48bc-40fc-8699-5e785e24616a Timestamp: 2026-03-04 08:30:26Z - Correlation ID: 74c3355b-48bc-40fc-8699-5e785e24616a - Trace ID: bb7ef67b-5b02-4c89-a856-98b0e8c12b00
Error getting the secret: invalid_client: 7000222 - [2026-03-04 08:30:26Z]: 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: 79b42172-2e6e-428a-8a79-75e0f19d0800 Correlation ID: c76990fc-ddc6-46b7-9924-9aed05b656c5 Timestamp: 2026-03-04 08:30:26Z - Correlation ID: c76990fc-ddc6-46b7-9924-9aed05b656c5 - Trace ID: 79b42172-2e6e-428a-8a79-75e0f19d0800
Error getting the secret: invalid_client: 7000222 - [2026-03-04 08:30:26Z]: 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: fb951796-b50d-4c38-a34f-30c55ac23c00 Correlation ID: be6b1a96-0e6b-44a5-809a-d777f82319f1 Timestamp: 2026-03-04 08:30:26Z - Correlation ID: be6b1a96-0e6b-44a5-809a-d777f82319f1 - Trace ID: fb951796-b50d-4c38-a34f-30c55ac23c00
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)