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-28 20:12:02Z]: 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: 64b3f66d-461a-407a-b179-2636c4f9c300 Correlation ID: 6d6148ac-99b9-4a38-b509-7aa5dd624e08 Timestamp: 2025-12-28 20:12:02Z - Correlation ID: 6d6148ac-99b9-4a38-b509-7aa5dd624e08 - Trace ID: 64b3f66d-461a-407a-b179-2636c4f9c300
(node:3256) [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-28 20:12:02Z]: 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: ec7f5a96-279f-4828-b016-b5ab54e8d300 Correlation ID: 461cb29c-b654-4d06-9bb9-d1300706a756 Timestamp: 2025-12-28 20:12:02Z - Correlation ID: 461cb29c-b654-4d06-9bb9-d1300706a756 - Trace ID: ec7f5a96-279f-4828-b016-b5ab54e8d300
Error getting the secret: invalid_client: 7000222 - [2025-12-28 20:12:02Z]: 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: e72c6b20-0a67-44e2-a86c-1ddf6f5eb500 Correlation ID: 9c4beb67-33d3-4a9d-9de5-31926da5f784 Timestamp: 2025-12-28 20:12:02Z - Correlation ID: 9c4beb67-33d3-4a9d-9de5-31926da5f784 - Trace ID: e72c6b20-0a67-44e2-a86c-1ddf6f5eb500
Error getting the secret: invalid_client: 7000222 - [2025-12-28 20:12:02Z]: 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: e72c6b20-0a67-44e2-a86c-1ddf745eb500 Correlation ID: 23f09728-8dea-42b0-921e-4d563fc33f74 Timestamp: 2025-12-28 20:12:02Z - Correlation ID: 23f09728-8dea-42b0-921e-4d563fc33f74 - Trace ID: e72c6b20-0a67-44e2-a86c-1ddf745eb500
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)