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-13 07:37: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: 18a3c80e-0132-47e7-8d1f-8ae3a9ac0600 Correlation ID: b85967db-bc1c-4ad7-8ee3-57b1a8ca43f2 Timestamp: 2026-03-13 07:37:15Z - Correlation ID: b85967db-bc1c-4ad7-8ee3-57b1a8ca43f2 - Trace ID: 18a3c80e-0132-47e7-8d1f-8ae3a9ac0600
(node:4648) [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-13 07:37: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: c982613a-a00d-4264-acec-5b9ded9b0300 Correlation ID: eda23687-72b7-4f47-be16-2e834b948af6 Timestamp: 2026-03-13 07:37:15Z - Correlation ID: eda23687-72b7-4f47-be16-2e834b948af6 - Trace ID: c982613a-a00d-4264-acec-5b9ded9b0300
Error getting the secret: invalid_client: 7000222 - [2026-03-13 07:37: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: 33cec422-c2db-437e-8404-57d79eee0700 Correlation ID: d6ca96e3-f6ad-4dc4-8812-cd9127deb9de Timestamp: 2026-03-13 07:37:15Z - Correlation ID: d6ca96e3-f6ad-4dc4-8812-cd9127deb9de - Trace ID: 33cec422-c2db-437e-8404-57d79eee0700
Error getting the secret: invalid_client: 7000222 - [2026-03-13 07:37: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: c6204a92-9eaa-4925-ad12-4dd9773d0800 Correlation ID: 4f7f0760-6167-4c1e-a064-60eec64aae29 Timestamp: 2026-03-13 07:37:16Z - Correlation ID: 4f7f0760-6167-4c1e-a064-60eec64aae29 - Trace ID: c6204a92-9eaa-4925-ad12-4dd9773d0800
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)