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-02-24 10:09:10Z]: 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: 6ee5357f-26c4-4504-b3de-7edd19766400 Correlation ID: aeb3ca5d-0b5b-4d30-89a5-123c6244282e Timestamp: 2026-02-24 10:09:10Z - Correlation ID: aeb3ca5d-0b5b-4d30-89a5-123c6244282e - Trace ID: 6ee5357f-26c4-4504-b3de-7edd19766400
(node:5304) [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-02-24 10:09:10Z]: 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: 0627ec41-b54c-4b51-a464-e942fd210000 Correlation ID: 35bff561-1558-4ddf-a2f4-2b0cd08a0b67 Timestamp: 2026-02-24 10:09:10Z - Correlation ID: 35bff561-1558-4ddf-a2f4-2b0cd08a0b67 - Trace ID: 0627ec41-b54c-4b51-a464-e942fd210000
Error getting the secret: invalid_client: 7000222 - [2026-02-24 10:09:10Z]: 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: d3771845-9215-477c-adf8-1a2ea1326600 Correlation ID: 30c25c12-c139-4eb1-a31d-b07223874b2c Timestamp: 2026-02-24 10:09:10Z - Correlation ID: 30c25c12-c139-4eb1-a31d-b07223874b2c - Trace ID: d3771845-9215-477c-adf8-1a2ea1326600
Error getting the secret: invalid_client: 7000222 - [2026-02-24 10:09:11Z]: 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: abdafeff-5688-4755-82d8-da18e0e83000 Correlation ID: face7a44-3b18-4e0f-a543-e3330b8bfb9f Timestamp: 2026-02-24 10:09:11Z - Correlation ID: face7a44-3b18-4e0f-a543-e3330b8bfb9f - Trace ID: abdafeff-5688-4755-82d8-da18e0e83000
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)