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-27 20:53:04Z]: 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: 0e6af33c-70fb-482e-83eb-76dd07aa1100 Correlation ID: 62ab2195-7d14-4f76-8474-d5b83d6f0bc3 Timestamp: 2026-03-27 20:53:04Z - Correlation ID: 62ab2195-7d14-4f76-8474-d5b83d6f0bc3 - Trace ID: 0e6af33c-70fb-482e-83eb-76dd07aa1100
(node:4444) [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-27 20:53:04Z]: 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: 7357de9f-6f4a-40bb-9059-dfed58c81000 Correlation ID: e502505d-bc12-4fe9-a1f4-f135736e685f Timestamp: 2026-03-27 20:53:04Z - Correlation ID: e502505d-bc12-4fe9-a1f4-f135736e685f - Trace ID: 7357de9f-6f4a-40bb-9059-dfed58c81000
Error getting the secret: invalid_client: 7000222 - [2026-03-27 20:53:04Z]: 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: b298e892-d9de-49bf-a817-05e6d6b14200 Correlation ID: 96f01908-6abe-41d2-9a0d-efd6ae49b64e Timestamp: 2026-03-27 20:53:04Z - Correlation ID: 96f01908-6abe-41d2-9a0d-efd6ae49b64e - Trace ID: b298e892-d9de-49bf-a817-05e6d6b14200
Error getting the secret: invalid_client: 7000222 - [2026-03-27 20:53:04Z]: 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: 3288b2a3-24d7-4b83-ba2f-8f5616b44100 Correlation ID: 7158d6bb-02e9-442e-ae61-b6a9ad848a08 Timestamp: 2026-03-27 20:53:04Z - Correlation ID: 7158d6bb-02e9-442e-ae61-b6a9ad848a08 - Trace ID: 3288b2a3-24d7-4b83-ba2f-8f5616b44100
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)