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-11-23 01:43: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: fab6089c-9738-438d-93b8-562e8ce20500 Correlation ID: 09b62292-dba9-4056-95c1-14f99ec0d9ff Timestamp: 2025-11-23 01:43:02Z - Correlation ID: 09b62292-dba9-4056-95c1-14f99ec0d9ff - Trace ID: fab6089c-9738-438d-93b8-562e8ce20500
(node:3540) [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-11-23 01:43: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: 4fe5aa7d-ecd3-40d8-8a8c-9d3ab08b0800 Correlation ID: 161c3c23-bb94-4306-9378-36ef197ef7c0 Timestamp: 2025-11-23 01:43:02Z - Correlation ID: 161c3c23-bb94-4306-9378-36ef197ef7c0 - Trace ID: 4fe5aa7d-ecd3-40d8-8a8c-9d3ab08b0800
Error getting the secret: invalid_client: 7000222 - [2025-11-23 01:43:03Z]: 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: 7540649e-c09d-4e1e-a1e9-b58bada20000 Correlation ID: ba20594f-1f00-4d44-a59e-fb01d28ac2e7 Timestamp: 2025-11-23 01:43:03Z - Correlation ID: ba20594f-1f00-4d44-a59e-fb01d28ac2e7 - Trace ID: 7540649e-c09d-4e1e-a1e9-b58bada20000
Error getting the secret: invalid_client: 7000222 - [2025-11-23 01:43:03Z]: 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: 2d72e1c5-813e-4a95-b890-91e7abf41400 Correlation ID: 02116dee-d54b-445f-9407-463382923c2c Timestamp: 2025-11-23 01:43:03Z - Correlation ID: 02116dee-d54b-445f-9407-463382923c2c - Trace ID: 2d72e1c5-813e-4a95-b890-91e7abf41400
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)