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-05-14 23:01:52Z]: 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: 07f0763b-c64f-4e49-80a1-1e79acce3e00 Correlation ID: e165c145-c236-4a8a-8bdc-bb52aed9120b Timestamp: 2026-05-14 23:01:52Z - Correlation ID: e165c145-c236-4a8a-8bdc-bb52aed9120b - Trace ID: 07f0763b-c64f-4e49-80a1-1e79acce3e00
(node:3744) [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-05-14 23:01:52Z]: 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: 55cf16c5-c7e9-414a-ba20-eecdcebc1100 Correlation ID: ad3233b9-1d88-4660-a7e5-e4c2c76ae795 Timestamp: 2026-05-14 23:01:52Z - Correlation ID: ad3233b9-1d88-4660-a7e5-e4c2c76ae795 - Trace ID: 55cf16c5-c7e9-414a-ba20-eecdcebc1100
Error getting the secret: invalid_client: 7000222 - [2026-05-14 23:01:52Z]: 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: 7c4a29cd-006d-4bf0-9358-19b110f60500 Correlation ID: 337a2bd1-b48e-4bbb-86d1-7d96fe8e29e9 Timestamp: 2026-05-14 23:01:52Z - Correlation ID: 337a2bd1-b48e-4bbb-86d1-7d96fe8e29e9 - Trace ID: 7c4a29cd-006d-4bf0-9358-19b110f60500
Error getting the secret: invalid_client: 7000222 - [2026-05-14 23:01:52Z]: 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: 55cf16c5-c7e9-414a-ba20-eecdd8bc1100 Correlation ID: 7635460f-4a71-40e0-9483-57ed34ad8740 Timestamp: 2026-05-14 23:01:52Z - Correlation ID: 7635460f-4a71-40e0-9483-57ed34ad8740 - Trace ID: 55cf16c5-c7e9-414a-ba20-eecdd8bc1100
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)