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-07 06:33:36Z]: 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: 826a577e-0703-4157-b1c4-db77ea299400 Correlation ID: 27cf3c3d-192f-4a10-8a02-a45f1cb9b1c7 Timestamp: 2026-03-07 06:33:36Z - Correlation ID: 27cf3c3d-192f-4a10-8a02-a45f1cb9b1c7 - Trace ID: 826a577e-0703-4157-b1c4-db77ea299400
(node:556) [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-07 06:33:36Z]: 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: 362bf716-437f-4039-914e-e7fac2f06f00 Correlation ID: 63cf1b57-f93b-4823-b69a-295979a03801 Timestamp: 2026-03-07 06:33:36Z - Correlation ID: 63cf1b57-f93b-4823-b69a-295979a03801 - Trace ID: 362bf716-437f-4039-914e-e7fac2f06f00
Error getting the secret: invalid_client: 7000222 - [2026-03-07 06:33:36Z]: 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: 12b095e0-9c94-4db7-bff0-aabde05a8a00 Correlation ID: 11331c12-9167-4ef9-89ad-171e02a6c463 Timestamp: 2026-03-07 06:33:36Z - Correlation ID: 11331c12-9167-4ef9-89ad-171e02a6c463 - Trace ID: 12b095e0-9c94-4db7-bff0-aabde05a8a00
Error getting the secret: invalid_client: 7000222 - [2026-03-07 06:33:36Z]: 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: 50abdcf7-ba17-47e4-9403-3c8ef9bf8500 Correlation ID: d4afa61d-6d60-4a0b-94bf-7f3fc6cf1051 Timestamp: 2026-03-07 06:33:36Z - Correlation ID: d4afa61d-6d60-4a0b-94bf-7f3fc6cf1051 - Trace ID: 50abdcf7-ba17-47e4-9403-3c8ef9bf8500
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)