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-01-04 00:49: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: 5313973a-a22f-47f4-9acd-9fa978908401 Correlation ID: c01b2ab7-2782-4259-885a-89fca90284db Timestamp: 2026-01-04 00:49:15Z - Correlation ID: c01b2ab7-2782-4259-885a-89fca90284db - Trace ID: 5313973a-a22f-47f4-9acd-9fa978908401
(node:5608) [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-01-04 00:49: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: 0646a84c-3270-4df4-921c-632f52f4d800 Correlation ID: cd809ea8-0780-44e2-b631-7f75b6299ec7 Timestamp: 2026-01-04 00:49:15Z - Correlation ID: cd809ea8-0780-44e2-b631-7f75b6299ec7 - Trace ID: 0646a84c-3270-4df4-921c-632f52f4d800
Error getting the secret: invalid_client: 7000222 - [2026-01-04 00:49: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: 6ef44540-8d83-4785-92e5-abf73a653a01 Correlation ID: b7df2ea3-eb96-4253-851c-1718334ec685 Timestamp: 2026-01-04 00:49:15Z - Correlation ID: b7df2ea3-eb96-4253-851c-1718334ec685 - Trace ID: 6ef44540-8d83-4785-92e5-abf73a653a01
Error getting the secret: invalid_client: 7000222 - [2026-01-04 00:49: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: 5457fecd-50a2-48bc-a0e8-9092021e6701 Correlation ID: 52760711-7c6a-48d0-822e-5a49f653480c Timestamp: 2026-01-04 00:49:15Z - Correlation ID: 52760711-7c6a-48d0-822e-5a49f653480c - Trace ID: 5457fecd-50a2-48bc-a0e8-9092021e6701
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)