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 02:07:35Z]: 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: 7d42f07e-0ae3-496d-bf2b-b4b9e0330400 Correlation ID: c7016706-ea60-4839-ab10-e6c756ace876 Timestamp: 2026-04-19 02:07:35Z - Correlation ID: c7016706-ea60-4839-ab10-e6c756ace876 - Trace ID: 7d42f07e-0ae3-496d-bf2b-b4b9e0330400
(node:4516) [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 02:07: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: 144b1d86-7fc8-40b3-95ed-b4fdff4f0700 Correlation ID: 52028f11-d718-4ff1-b9ad-dd2c1426b721 Timestamp: 2026-04-19 02:07:36Z - Correlation ID: 52028f11-d718-4ff1-b9ad-dd2c1426b721 - Trace ID: 144b1d86-7fc8-40b3-95ed-b4fdff4f0700
Error getting the secret: invalid_client: 7000222 - [2026-04-19 02:07: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: bd61bb67-fb44-42a2-ace8-050eb4001a00 Correlation ID: d75307d1-acbb-4648-9aee-c1ac57a62c2f Timestamp: 2026-04-19 02:07:36Z - Correlation ID: d75307d1-acbb-4648-9aee-c1ac57a62c2f - Trace ID: bd61bb67-fb44-42a2-ace8-050eb4001a00
Error getting the secret: invalid_client: 7000222 - [2026-04-19 02:07: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: 7d42f07e-0ae3-496d-bf2b-b4b9e6330400 Correlation ID: 99d27b89-f291-421f-9214-6d788581e3a7 Timestamp: 2026-04-19 02:07:36Z - Correlation ID: 99d27b89-f291-421f-9214-6d788581e3a7 - Trace ID: 7d42f07e-0ae3-496d-bf2b-b4b9e6330400
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)