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-06 04:40: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: 519b7181-cf76-4632-bb2e-90cd8b324700 Correlation ID: 1b7c7e8a-5943-498a-ad1b-d1a36629ac53 Timestamp: 2026-03-06 04:40:04Z - Correlation ID: 1b7c7e8a-5943-498a-ad1b-d1a36629ac53 - Trace ID: 519b7181-cf76-4632-bb2e-90cd8b324700
(node:4116) [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-06 04:40:05Z]: 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: 39e0b307-79a1-4d2e-a99d-a1ed8de15a00 Correlation ID: 7d5702ab-2e1e-4414-ad10-6e897756eb40 Timestamp: 2026-03-06 04:40:05Z - Correlation ID: 7d5702ab-2e1e-4414-ad10-6e897756eb40 - Trace ID: 39e0b307-79a1-4d2e-a99d-a1ed8de15a00
Error getting the secret: invalid_client: 7000222 - [2026-03-06 04:40:05Z]: 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: 2bfdc1a7-c231-4990-a30c-a1d736f86b00 Correlation ID: 30a2bffc-dd2c-4849-9326-174a54b24ede Timestamp: 2026-03-06 04:40:05Z - Correlation ID: 30a2bffc-dd2c-4849-9326-174a54b24ede - Trace ID: 2bfdc1a7-c231-4990-a30c-a1d736f86b00
Error getting the secret: invalid_client: 7000222 - [2026-03-06 04:40:05Z]: 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: 2bfdc1a7-c231-4990-a30c-a1d73bf86b00 Correlation ID: 338b3c0e-a057-4d17-afb4-3375bc68adae Timestamp: 2026-03-06 04:40:05Z - Correlation ID: 338b3c0e-a057-4d17-afb4-3375bc68adae - Trace ID: 2bfdc1a7-c231-4990-a30c-a1d73bf86b00
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)