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-03-06 01:18:25Z]: 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: ebbce555-70d0-4c1e-9ca8-5efe794d6e00 Correlation ID: 15fa57cc-3ea0-41ff-ac4e-97cc043a7c90 Timestamp: 2026-03-06 01:18:25Z - Correlation ID: 15fa57cc-3ea0-41ff-ac4e-97cc043a7c90 - Trace ID: ebbce555-70d0-4c1e-9ca8-5efe794d6e00
(node:4120) [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-03-06 01:18:26Z]: 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: c0a56c8c-baec-47de-9432-7ea0a96ed700 Correlation ID: 58c3277b-1ff0-4c92-8494-2b469c74fddf Timestamp: 2026-03-06 01:18:26Z - Correlation ID: 58c3277b-1ff0-4c92-8494-2b469c74fddf - Trace ID: c0a56c8c-baec-47de-9432-7ea0a96ed700
Error getting the secret: invalid_client: 7000222 - [2026-03-06 01:18:26Z]: 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: ce57c087-5672-43c8-af71-a0f5407c3900 Correlation ID: a1a16eb5-52de-4ebf-826e-ca192f4b2056 Timestamp: 2026-03-06 01:18:26Z - Correlation ID: a1a16eb5-52de-4ebf-826e-ca192f4b2056 - Trace ID: ce57c087-5672-43c8-af71-a0f5407c3900
Error getting the secret: invalid_client: 7000222 - [2026-03-06 01:18:26Z]: 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: 49e6469a-9559-4ecd-8f8c-b32faa265b00 Correlation ID: 8c9ce7ab-6c2c-4eb1-a881-1b7ece1ad544 Timestamp: 2026-03-06 01:18:26Z - Correlation ID: 8c9ce7ab-6c2c-4eb1-a881-1b7ece1ad544 - Trace ID: 49e6469a-9559-4ecd-8f8c-b32faa265b00
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)