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-04 02:20:05Z]: 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: 81213fc0-4fe5-4e7d-b7eb-e36d9c7d0000 Correlation ID: c8c5527b-eefd-498c-b7c8-f9e36c07a330 Timestamp: 2026-04-04 02:20:05Z - Correlation ID: c8c5527b-eefd-498c-b7c8-f9e36c07a330 - Trace ID: 81213fc0-4fe5-4e7d-b7eb-e36d9c7d0000
(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-04-04 02:20:06Z]: 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: 86234a49-5681-40c1-a512-b354c9003700 Correlation ID: ee2532d5-7730-4390-b825-5ae22841a7d1 Timestamp: 2026-04-04 02:20:06Z - Correlation ID: ee2532d5-7730-4390-b825-5ae22841a7d1 - Trace ID: 86234a49-5681-40c1-a512-b354c9003700
Error getting the secret: invalid_client: 7000222 - [2026-04-04 02:20:06Z]: 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: cb5e0f79-5b75-4b61-a354-649603520000 Correlation ID: 430fc910-78e0-45f1-a84f-ed911602464e Timestamp: 2026-04-04 02:20:06Z - Correlation ID: 430fc910-78e0-45f1-a84f-ed911602464e - Trace ID: cb5e0f79-5b75-4b61-a354-649603520000
Error getting the secret: invalid_client: 7000222 - [2026-04-04 02:20:07Z]: 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: d0340fbd-4b81-4653-82d9-329254034000 Correlation ID: b03bfb12-f6e6-4389-b7f2-c91dd184732b Timestamp: 2026-04-04 02:20:07Z - Correlation ID: b03bfb12-f6e6-4389-b7f2-c91dd184732b - Trace ID: d0340fbd-4b81-4653-82d9-329254034000
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)