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 07:28:23Z]: 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: a0b6f9e5-a23f-4146-b1c5-8fd3ff154200 Correlation ID: b996f761-84e7-4703-a4b3-e1d81d2ae62d Timestamp: 2026-03-06 07:28:23Z - Correlation ID: b996f761-84e7-4703-a4b3-e1d81d2ae62d - Trace ID: a0b6f9e5-a23f-4146-b1c5-8fd3ff154200
(node:1008) [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 07:28:23Z]: 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: 0f12ca11-e107-49ba-8e58-f236d85e5200 Correlation ID: f8cc628f-0b5a-450e-9491-086cd5ac5cf7 Timestamp: 2026-03-06 07:28:23Z - Correlation ID: f8cc628f-0b5a-450e-9491-086cd5ac5cf7 - Trace ID: 0f12ca11-e107-49ba-8e58-f236d85e5200
Error getting the secret: invalid_client: 7000222 - [2026-03-06 07:28:23Z]: 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: 32cb46a6-a0dc-48ef-9811-c80774154500 Correlation ID: 8198b129-9c15-4e2d-8245-9ca2cc38a6d8 Timestamp: 2026-03-06 07:28:23Z - Correlation ID: 8198b129-9c15-4e2d-8245-9ca2cc38a6d8 - Trace ID: 32cb46a6-a0dc-48ef-9811-c80774154500
Error getting the secret: invalid_client: 7000222 - [2026-03-06 07:28:24Z]: 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: a043617d-d8e6-4295-85cc-da0bf232df00 Correlation ID: c0fde4d6-1925-427d-a21a-78ede55d576d Timestamp: 2026-03-06 07:28:24Z - Correlation ID: c0fde4d6-1925-427d-a21a-78ede55d576d - Trace ID: a043617d-d8e6-4295-85cc-da0bf232df00
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)