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-24 19:07:01Z]: 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: a4855bfc-a87d-4155-9ca7-9e7babb10300 Correlation ID: 6685f604-80e8-4cb9-a3a5-ff3b8a638892 Timestamp: 2026-03-24 19:07:01Z - Correlation ID: 6685f604-80e8-4cb9-a3a5-ff3b8a638892 - Trace ID: a4855bfc-a87d-4155-9ca7-9e7babb10300
(node:5000) [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-24 19:07:02Z]: 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: 2f8b1260-b3cf-4872-abed-5c7dc0f04700 Correlation ID: 7d441301-5b47-4872-9d24-96ffbda5e760 Timestamp: 2026-03-24 19:07:02Z - Correlation ID: 7d441301-5b47-4872-9d24-96ffbda5e760 - Trace ID: 2f8b1260-b3cf-4872-abed-5c7dc0f04700
Error getting the secret: invalid_client: 7000222 - [2026-03-24 19:07:02Z]: 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: 172659f9-34dd-48b8-bbed-a356e6a55200 Correlation ID: 26eccdb5-68ec-4ade-a2f2-0336a8823dec Timestamp: 2026-03-24 19:07:02Z - Correlation ID: 26eccdb5-68ec-4ade-a2f2-0336a8823dec - Trace ID: 172659f9-34dd-48b8-bbed-a356e6a55200
Error getting the secret: invalid_client: 7000222 - [2026-03-24 19:07:02Z]: 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: 172659f9-34dd-48b8-bbed-a356fda55200 Correlation ID: d629581e-72e5-4be6-95f9-3348e7a41da9 Timestamp: 2026-03-24 19:07:02Z - Correlation ID: d629581e-72e5-4be6-95f9-3348e7a41da9 - Trace ID: 172659f9-34dd-48b8-bbed-a356fda55200
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)