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-20 09:18:12Z]: 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: 20d26a9a-0a2e-44e3-a95e-df8cb6d10900 Correlation ID: 52b2db06-3985-4413-9c85-b3834c651684 Timestamp: 2026-04-20 09:18:12Z - Correlation ID: 52b2db06-3985-4413-9c85-b3834c651684 - Trace ID: 20d26a9a-0a2e-44e3-a95e-df8cb6d10900
(node:4596) [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-20 09:18:13Z]: 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: b8b99593-93f0-465b-9470-c5086e870900 Correlation ID: 6780af47-acdc-46f2-b8b1-d01c245d63fc Timestamp: 2026-04-20 09:18:13Z - Correlation ID: 6780af47-acdc-46f2-b8b1-d01c245d63fc - Trace ID: b8b99593-93f0-465b-9470-c5086e870900
Error getting the secret: invalid_client: 7000222 - [2026-04-20 09:18:13Z]: 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: 7a7a60fc-a06b-4dc8-88fa-e5eefe010a00 Correlation ID: 493d3df4-b164-45c2-934d-d26ea9437013 Timestamp: 2026-04-20 09:18:13Z - Correlation ID: 493d3df4-b164-45c2-934d-d26ea9437013 - Trace ID: 7a7a60fc-a06b-4dc8-88fa-e5eefe010a00
Error getting the secret: invalid_client: 7000222 - [2026-04-20 09:18:13Z]: 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: 98040211-fc31-4a09-94a7-d6703b7d0900 Correlation ID: 3e75edb6-aa83-4b50-a1dd-cbb9539dd880 Timestamp: 2026-04-20 09:18:13Z - Correlation ID: 3e75edb6-aa83-4b50-a1dd-cbb9539dd880 - Trace ID: 98040211-fc31-4a09-94a7-d6703b7d0900
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)