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-16 02:16:18Z]: 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: 255ad988-d3f3-44cc-9938-2bdc5df13500 Correlation ID: e350319e-721e-49fa-85de-9f4667d82cf7 Timestamp: 2026-03-16 02:16:18Z - Correlation ID: e350319e-721e-49fa-85de-9f4667d82cf7 - Trace ID: 255ad988-d3f3-44cc-9938-2bdc5df13500
(node:3280) [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-16 02:16:19Z]: 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: ad7c06a5-123f-44c0-8015-e808ccf13d00 Correlation ID: 1058e6d5-83cd-4374-a12b-58351c70b0fb Timestamp: 2026-03-16 02:16:19Z - Correlation ID: 1058e6d5-83cd-4374-a12b-58351c70b0fb - Trace ID: ad7c06a5-123f-44c0-8015-e808ccf13d00
Error getting the secret: invalid_client: 7000222 - [2026-03-16 02:16:19Z]: 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: 93c50b9f-3bd8-4658-9e7d-8aa0b9553900 Correlation ID: ad210f95-74af-41d5-b905-bba9c1b8d253 Timestamp: 2026-03-16 02:16:19Z - Correlation ID: ad210f95-74af-41d5-b905-bba9c1b8d253 - Trace ID: 93c50b9f-3bd8-4658-9e7d-8aa0b9553900
Error getting the secret: invalid_client: 7000222 - [2026-03-16 02:16:19Z]: 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: 3f24aa16-c4ed-4fab-aae8-84ed215a3600 Correlation ID: f195292f-9441-4f92-9aa2-a92ff28883c3 Timestamp: 2026-03-16 02:16:19Z - Correlation ID: f195292f-9441-4f92-9aa2-a92ff28883c3 - Trace ID: 3f24aa16-c4ed-4fab-aae8-84ed215a3600
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)