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-31 18:35:23Z]: 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: 322d966c-04f8-44a4-9cff-6ef6e09b0201 Correlation ID: 3f51c68c-c036-4087-a69a-b7986e70a7f1 Timestamp: 2025-12-31 18:35:23Z - Correlation ID: 3f51c68c-c036-4087-a69a-b7986e70a7f1 - Trace ID: 322d966c-04f8-44a4-9cff-6ef6e09b0201
(node:756) [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-31 18:35:23Z]: 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: 99740040-d4cf-4df2-a03b-197545a01601 Correlation ID: 95a7d033-da47-457c-a296-136c0b23584b Timestamp: 2025-12-31 18:35:23Z - Correlation ID: 95a7d033-da47-457c-a296-136c0b23584b - Trace ID: 99740040-d4cf-4df2-a03b-197545a01601
Error getting the secret: invalid_client: 7000222 - [2025-12-31 18:35:23Z]: 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: 83f6dda4-57f5-42cb-844a-cf22c4f90901 Correlation ID: 910fb4dd-1f01-4c24-8555-79b4e2e6e20c Timestamp: 2025-12-31 18:35:23Z - Correlation ID: 910fb4dd-1f01-4c24-8555-79b4e2e6e20c - Trace ID: 83f6dda4-57f5-42cb-844a-cf22c4f90901
Error getting the secret: invalid_client: 7000222 - [2025-12-31 18:35:23Z]: 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: 5ec68d92-a08d-48ca-a5e0-5cc426b82f01 Correlation ID: 8dcabb2e-782c-48ba-a4f1-ad3273bab5bd Timestamp: 2025-12-31 18:35:23Z - Correlation ID: 8dcabb2e-782c-48ba-a4f1-ad3273bab5bd - Trace ID: 5ec68d92-a08d-48ca-a5e0-5cc426b82f01
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)