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-05 00:53:21Z]: 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: 0c6988fe-d0bf-4e60-b870-ee71c3701500 Correlation ID: 3ca516b1-4999-4d95-b0fd-b82f5343fbe4 Timestamp: 2026-04-05 00:53:21Z - Correlation ID: 3ca516b1-4999-4d95-b0fd-b82f5343fbe4 - Trace ID: 0c6988fe-d0bf-4e60-b870-ee71c3701500
(node:1600) [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-05 00:53:21Z]: 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: 0c6988fe-d0bf-4e60-b870-ee71c9701500 Correlation ID: 590b4f43-a752-4a30-8356-57913925024a Timestamp: 2026-04-05 00:53:21Z - Correlation ID: 590b4f43-a752-4a30-8356-57913925024a - Trace ID: 0c6988fe-d0bf-4e60-b870-ee71c9701500
Error getting the secret: invalid_client: 7000222 - [2026-04-05 00:53:21Z]: 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: f36f6c40-069e-4c29-b63c-8b15a9bd2200 Correlation ID: 253430af-9511-42cc-978b-a8691263248d Timestamp: 2026-04-05 00:53:21Z - Correlation ID: 253430af-9511-42cc-978b-a8691263248d - Trace ID: f36f6c40-069e-4c29-b63c-8b15a9bd2200
Error getting the secret: invalid_client: 7000222 - [2026-04-05 00:53: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: e089f330-9a82-40ae-a9cf-750ee8322300 Correlation ID: 824407ce-a3d9-4a02-954e-57d3a1238093 Timestamp: 2026-04-05 00:53:22Z - Correlation ID: 824407ce-a3d9-4a02-954e-57d3a1238093 - Trace ID: e089f330-9a82-40ae-a9cf-750ee8322300
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)