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 - [2025-12-15 09:04:57Z]: 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: 1f3a3e2d-7fb7-4c17-9cda-56ba1dc81300 Correlation ID: a0d48a1b-de0a-4183-babb-f9d30d46807c Timestamp: 2025-12-15 09:04:57Z - Correlation ID: a0d48a1b-de0a-4183-babb-f9d30d46807c - Trace ID: 1f3a3e2d-7fb7-4c17-9cda-56ba1dc81300
(node:4548) [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 - [2025-12-15 09:04:57Z]: 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: c96b9c7e-db3d-499e-983b-8bb8f1505700 Correlation ID: 0bf90ff5-dad9-4062-9701-79c75f6a772f Timestamp: 2025-12-15 09:04:57Z - Correlation ID: 0bf90ff5-dad9-4062-9701-79c75f6a772f - Trace ID: c96b9c7e-db3d-499e-983b-8bb8f1505700
Error getting the secret: invalid_client: 7000222 - [2025-12-15 09:04:57Z]: 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: 905da634-80b6-4e5e-b1bd-dd9057259100 Correlation ID: 56a39b20-91a7-4370-9097-4e3f245c737c Timestamp: 2025-12-15 09:04:57Z - Correlation ID: 56a39b20-91a7-4370-9097-4e3f245c737c - Trace ID: 905da634-80b6-4e5e-b1bd-dd9057259100
Error getting the secret: invalid_client: 7000222 - [2025-12-15 09:04:57Z]: 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: 1f3a3e2d-7fb7-4c17-9cda-56ba2ec81300 Correlation ID: 09ddf296-38ca-4126-87f2-1ed25d7da73f Timestamp: 2025-12-15 09:04:57Z - Correlation ID: 09ddf296-38ca-4126-87f2-1ed25d7da73f - Trace ID: 1f3a3e2d-7fb7-4c17-9cda-56ba2ec81300
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)