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-04-28 07:04:56Z]: 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: 29a82f5f-9ad9-4074-b511-b828f2764900 Correlation ID: a0db03b1-4a90-4c20-acb8-d26f7f220b56 Timestamp: 2026-04-28 07:04:56Z - Correlation ID: a0db03b1-4a90-4c20-acb8-d26f7f220b56 - Trace ID: 29a82f5f-9ad9-4074-b511-b828f2764900
(node:5452) [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-04-28 07:04:56Z]: 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: 29a82f5f-9ad9-4074-b511-b828fd764900 Correlation ID: 8b512b7d-af60-428e-acac-1b8d4b23f088 Timestamp: 2026-04-28 07:04:56Z - Correlation ID: 8b512b7d-af60-428e-acac-1b8d4b23f088 - Trace ID: 29a82f5f-9ad9-4074-b511-b828fd764900
Error getting the secret: invalid_client: 7000222 - [2026-04-28 07:04:56Z]: 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: a0be43c6-eba3-4096-a8d5-add21d8e5300 Correlation ID: fd9309dc-182a-4a60-a7f6-805dc413d184 Timestamp: 2026-04-28 07:04:56Z - Correlation ID: fd9309dc-182a-4a60-a7f6-805dc413d184 - Trace ID: a0be43c6-eba3-4096-a8d5-add21d8e5300
Error getting the secret: invalid_client: 7000222 - [2026-04-28 07:04:57Z]: 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: 0633a747-c8a8-4d93-ad1c-103da1e25300 Correlation ID: a5ac4f04-c700-40a2-9f1f-4b25c93c98bc Timestamp: 2026-04-28 07:04:57Z - Correlation ID: a5ac4f04-c700-40a2-9f1f-4b25c93c98bc - Trace ID: 0633a747-c8a8-4d93-ad1c-103da1e25300
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)