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-17 07:29:43Z]: 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: 1747f97a-74e5-4b4e-a83f-b83c7dd40c00 Correlation ID: 02c0b563-2473-4a96-880e-e07c1db77256 Timestamp: 2026-01-17 07:29:43Z - Correlation ID: 02c0b563-2473-4a96-880e-e07c1db77256 - Trace ID: 1747f97a-74e5-4b4e-a83f-b83c7dd40c00
(node:2264) [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-17 07:29:43Z]: 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: 26e14613-c674-4ef9-8b30-2c005b0b0a00 Correlation ID: 6ace9a0b-173a-4e98-9f37-337abef377d6 Timestamp: 2026-01-17 07:29:43Z - Correlation ID: 6ace9a0b-173a-4e98-9f37-337abef377d6 - Trace ID: 26e14613-c674-4ef9-8b30-2c005b0b0a00
Error getting the secret: invalid_client: 7000222 - [2026-01-17 07:29:44Z]: 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: 7b702a6f-9922-4395-9b81-6909e12f2700 Correlation ID: e25f3803-ac4d-457a-b501-768a6d4932f8 Timestamp: 2026-01-17 07:29:44Z - Correlation ID: e25f3803-ac4d-457a-b501-768a6d4932f8 - Trace ID: 7b702a6f-9922-4395-9b81-6909e12f2700
Error getting the secret: invalid_client: 7000222 - [2026-01-17 07:29:44Z]: 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: 0fc63ab6-151e-42cc-931d-87d2e6b60d00 Correlation ID: 0f116d85-83d6-4c07-a95c-1f5549c337be Timestamp: 2026-01-17 07:29:44Z - Correlation ID: 0f116d85-83d6-4c07-a95c-1f5549c337be - Trace ID: 0fc63ab6-151e-42cc-931d-87d2e6b60d00
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)