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-19 19:39:29Z]: 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: 069e517e-130e-419b-8d01-175fc67c0d00 Correlation ID: e1d8aa92-0256-4198-b5b6-720d451e288f Timestamp: 2026-04-19 19:39:29Z - Correlation ID: e1d8aa92-0256-4198-b5b6-720d451e288f - Trace ID: 069e517e-130e-419b-8d01-175fc67c0d00
(node:3360) [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-19 19:39:29Z]: 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: 541395aa-6d3e-4fe5-8e70-3f39e3d00000 Correlation ID: b25b0032-13bc-4d22-b190-275d3c5c796b Timestamp: 2026-04-19 19:39:29Z - Correlation ID: b25b0032-13bc-4d22-b190-275d3c5c796b - Trace ID: 541395aa-6d3e-4fe5-8e70-3f39e3d00000
Error getting the secret: invalid_client: 7000222 - [2026-04-19 19:39:29Z]: 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: 8e18b099-dfaa-4422-96cc-6d34402c0a00 Correlation ID: 957908cd-483e-49b6-8076-17816d1e150f Timestamp: 2026-04-19 19:39:29Z - Correlation ID: 957908cd-483e-49b6-8076-17816d1e150f - Trace ID: 8e18b099-dfaa-4422-96cc-6d34402c0a00
Error getting the secret: invalid_client: 7000222 - [2026-04-19 19:39:29Z]: 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: 9dae19d2-44e4-421f-8a0f-4a20ce2b2d00 Correlation ID: d16a0ce4-a23b-4ab0-98cd-21737e372a42 Timestamp: 2026-04-19 19:39:29Z - Correlation ID: d16a0ce4-a23b-4ab0-98cd-21737e372a42 - Trace ID: 9dae19d2-44e4-421f-8a0f-4a20ce2b2d00
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)