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-01 10:56:58Z]: 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: 6679ed68-cfa9-405d-8e67-1721c8512300 Correlation ID: ae290f45-fc8e-46a2-8ec5-6ad6ed2bac29 Timestamp: 2026-04-01 10:56:58Z - Correlation ID: ae290f45-fc8e-46a2-8ec5-6ad6ed2bac29 - Trace ID: 6679ed68-cfa9-405d-8e67-1721c8512300
(node:3868) [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-01 10:56:58Z]: 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: e34f234d-8fed-40cd-a6ff-f98ae3dc5300 Correlation ID: 677590f3-53d5-4afc-8690-0202fe27549f Timestamp: 2026-04-01 10:56:58Z - Correlation ID: 677590f3-53d5-4afc-8690-0202fe27549f - Trace ID: e34f234d-8fed-40cd-a6ff-f98ae3dc5300
Error getting the secret: invalid_client: 7000222 - [2026-04-01 10:56:59Z]: 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: 40a07dfa-cf97-4c21-a94e-20d5e9e05500 Correlation ID: a86ee8c7-bc9d-47cf-b90c-19d81b4be2a5 Timestamp: 2026-04-01 10:56:59Z - Correlation ID: a86ee8c7-bc9d-47cf-b90c-19d81b4be2a5 - Trace ID: 40a07dfa-cf97-4c21-a94e-20d5e9e05500
Error getting the secret: invalid_client: 7000222 - [2026-04-01 10:56:59Z]: 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: 4b589fc0-7be7-412b-9e31-2c0ce31d0300 Correlation ID: 798b9924-905e-4528-9e0d-1d43296e6fbf Timestamp: 2026-04-01 10:56:59Z - Correlation ID: 798b9924-905e-4528-9e0d-1d43296e6fbf - Trace ID: 4b589fc0-7be7-412b-9e31-2c0ce31d0300
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)