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-16 10:51: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: efd2f485-17d8-4d8a-b3ff-6b2669e31800 Correlation ID: e3226498-3c7d-49d3-ab14-aca8e1283a54 Timestamp: 2026-04-16 10:51:02Z - Correlation ID: e3226498-3c7d-49d3-ab14-aca8e1283a54 - Trace ID: efd2f485-17d8-4d8a-b3ff-6b2669e31800
(node:4052) [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-16 10:51: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: efd2f485-17d8-4d8a-b3ff-6b2675e31800 Correlation ID: e50c5e8d-7319-4ab5-a35b-569e81948ae1 Timestamp: 2026-04-16 10:51:02Z - Correlation ID: e50c5e8d-7319-4ab5-a35b-569e81948ae1 - Trace ID: efd2f485-17d8-4d8a-b3ff-6b2675e31800
Error getting the secret: invalid_client: 7000222 - [2026-04-16 10:51: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: 2ac1bb5e-517b-4a62-bab4-3469156d0400 Correlation ID: 8a878272-54e2-48ca-9edc-345f1b650ea5 Timestamp: 2026-04-16 10:51:02Z - Correlation ID: 8a878272-54e2-48ca-9edc-345f1b650ea5 - Trace ID: 2ac1bb5e-517b-4a62-bab4-3469156d0400
Error getting the secret: invalid_client: 7000222 - [2026-04-16 10:51:03Z]: 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: 2fb246b0-9295-414e-b05a-92cfe2f12000 Correlation ID: ecfd7f9c-af3a-490e-b39f-4bb4ce4055f7 Timestamp: 2026-04-16 10:51:03Z - Correlation ID: ecfd7f9c-af3a-490e-b39f-4bb4ce4055f7 - Trace ID: 2fb246b0-9295-414e-b05a-92cfe2f12000
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)