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-29 19:02:15Z]: 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: 42770a7c-d783-4b48-bf80-a8c8f9b31d00 Correlation ID: e8636243-1ddf-46d9-95c5-29fa145a1b8c Timestamp: 2026-03-29 19:02:15Z - Correlation ID: e8636243-1ddf-46d9-95c5-29fa145a1b8c - Trace ID: 42770a7c-d783-4b48-bf80-a8c8f9b31d00
(node:3308) [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-29 19:02:15Z]: 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: e533d815-d642-40d3-8ff8-fddbf41e1b00 Correlation ID: 6ac615ee-3df9-4918-bbe6-406ef7f96d29 Timestamp: 2026-03-29 19:02:15Z - Correlation ID: 6ac615ee-3df9-4918-bbe6-406ef7f96d29 - Trace ID: e533d815-d642-40d3-8ff8-fddbf41e1b00
Error getting the secret: invalid_client: 7000222 - [2026-03-29 19:02:15Z]: 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: 28acc5c4-8f9f-4373-8e05-c128d2fd1800 Correlation ID: c3526749-aef8-4e53-8c78-b092098b3f73 Timestamp: 2026-03-29 19:02:15Z - Correlation ID: c3526749-aef8-4e53-8c78-b092098b3f73 - Trace ID: 28acc5c4-8f9f-4373-8e05-c128d2fd1800
Error getting the secret: invalid_client: 7000222 - [2026-03-29 19:02:15Z]: 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: b270e182-867b-4aad-8024-e3426c8d1800 Correlation ID: 41344e17-9266-4074-b333-78ae2c0c7685 Timestamp: 2026-03-29 19:02:15Z - Correlation ID: 41344e17-9266-4074-b333-78ae2c0c7685 - Trace ID: b270e182-867b-4aad-8024-e3426c8d1800
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)