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-02-23 22:17: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: 7be85fb7-8bd9-4715-bb18-d1fb2ba02800 Correlation ID: 59e8d87f-0de2-4e66-95fc-59fda5ab21ef Timestamp: 2026-02-23 22:17:15Z - Correlation ID: 59e8d87f-0de2-4e66-95fc-59fda5ab21ef - Trace ID: 7be85fb7-8bd9-4715-bb18-d1fb2ba02800
(node:5532) [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-02-23 22:17: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: da1b892b-c997-43ff-aef6-e1c0a37c0900 Correlation ID: 01194543-00ee-4f2d-a589-cdbec3ffb35e Timestamp: 2026-02-23 22:17:15Z - Correlation ID: 01194543-00ee-4f2d-a589-cdbec3ffb35e - Trace ID: da1b892b-c997-43ff-aef6-e1c0a37c0900
Error getting the secret: invalid_client: 7000222 - [2026-02-23 22:17:16Z]: 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: da1b892b-c997-43ff-aef6-e1c0a67c0900 Correlation ID: 315b566e-316c-49b5-a681-234df864ff1d Timestamp: 2026-02-23 22:17:16Z - Correlation ID: 315b566e-316c-49b5-a681-234df864ff1d - Trace ID: da1b892b-c997-43ff-aef6-e1c0a67c0900
Error getting the secret: invalid_client: 7000222 - [2026-02-23 22:17:16Z]: 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: 0a1f9031-f63a-42cf-9072-3a8559986a00 Correlation ID: 1ff137ca-6d42-4729-b28e-888aeecb2f7e Timestamp: 2026-02-23 22:17:16Z - Correlation ID: 1ff137ca-6d42-4729-b28e-888aeecb2f7e - Trace ID: 0a1f9031-f63a-42cf-9072-3a8559986a00
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)