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-05-16 05:15:55Z]: 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: 05aaefb0-01b5-485b-a64a-ba0e23451000 Correlation ID: 3c6354d1-79aa-4786-96a6-31115059dc8e Timestamp: 2026-05-16 05:15:55Z - Correlation ID: 3c6354d1-79aa-4786-96a6-31115059dc8e - Trace ID: 05aaefb0-01b5-485b-a64a-ba0e23451000
(node:5560) [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-05-16 05:15:56Z]: 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: 05aaefb0-01b5-485b-a64a-ba0e2c451000 Correlation ID: fdd3d5f2-1d00-4822-bea6-c8037483ddc1 Timestamp: 2026-05-16 05:15:56Z - Correlation ID: fdd3d5f2-1d00-4822-bea6-c8037483ddc1 - Trace ID: 05aaefb0-01b5-485b-a64a-ba0e2c451000
Error getting the secret: invalid_client: 7000222 - [2026-05-16 05:15:56Z]: 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: e194f1a0-fd88-475e-bcde-7a633c9b1500 Correlation ID: 3b30ae3c-4077-47d9-b046-35fe6259d2fe Timestamp: 2026-05-16 05:15:56Z - Correlation ID: 3b30ae3c-4077-47d9-b046-35fe6259d2fe - Trace ID: e194f1a0-fd88-475e-bcde-7a633c9b1500
Error getting the secret: invalid_client: 7000222 - [2026-05-16 05:15:56Z]: 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: f7162bcb-9293-4593-86e5-63e8fd561300 Correlation ID: f9950782-8eb3-4190-b0ef-1979c72d085f Timestamp: 2026-05-16 05:15:56Z - Correlation ID: f9950782-8eb3-4190-b0ef-1979c72d085f - Trace ID: f7162bcb-9293-4593-86e5-63e8fd561300
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)