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-16 12:54:32Z]: 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: 32a8605f-5a6b-4d44-b542-4339a1020300 Correlation ID: dfa38675-5647-4492-885b-e5594cfdea5c Timestamp: 2026-03-16 12:54:32Z - Correlation ID: dfa38675-5647-4492-885b-e5594cfdea5c - Trace ID: 32a8605f-5a6b-4d44-b542-4339a1020300
(node:5788) [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-16 12:54:33Z]: 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: 223f7ad5-8b5f-4eb6-a6e1-ed9bd5583600 Correlation ID: 80732162-3a53-42b1-abd8-97b6e292faf4 Timestamp: 2026-03-16 12:54:33Z - Correlation ID: 80732162-3a53-42b1-abd8-97b6e292faf4 - Trace ID: 223f7ad5-8b5f-4eb6-a6e1-ed9bd5583600
Error getting the secret: invalid_client: 7000222 - [2026-03-16 12:54:33Z]: 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: e44ea461-d463-4881-86ba-94cd0b7d2e00 Correlation ID: c63488ef-df92-498a-b3a5-ebdd8cc6ea13 Timestamp: 2026-03-16 12:54:33Z - Correlation ID: c63488ef-df92-498a-b3a5-ebdd8cc6ea13 - Trace ID: e44ea461-d463-4881-86ba-94cd0b7d2e00
Error getting the secret: invalid_client: 7000222 - [2026-03-16 12:54:33Z]: 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: 7a314dc0-81bf-4e77-a596-524228663500 Correlation ID: 24705cf0-8164-419a-9035-c49433986647 Timestamp: 2026-03-16 12:54:33Z - Correlation ID: 24705cf0-8164-419a-9035-c49433986647 - Trace ID: 7a314dc0-81bf-4e77-a596-524228663500
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)