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-07 18:42:48Z]: 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: ef508154-641f-4d02-8588-f8bf984c3200 Correlation ID: ac5bd065-7a03-4a0a-bca7-00b9b34ee9d4 Timestamp: 2025-11-07 18:42:48Z - Correlation ID: ac5bd065-7a03-4a0a-bca7-00b9b34ee9d4 - Trace ID: ef508154-641f-4d02-8588-f8bf984c3200
(node:1648) [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-07 18:42:48Z]: 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: 27d3f566-560e-465c-9719-e828ce195600 Correlation ID: 55bf75ba-3e16-4c8e-ac4b-4887398b2e87 Timestamp: 2025-11-07 18:42:48Z - Correlation ID: 55bf75ba-3e16-4c8e-ac4b-4887398b2e87 - Trace ID: 27d3f566-560e-465c-9719-e828ce195600
Error getting the secret: invalid_client: 7000222 - [2025-11-07 18:42:48Z]: 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: 704acf2d-4fc7-4cab-a046-01e252c85b00 Correlation ID: 809c4d36-837f-4da2-a0cf-691a50ec714f Timestamp: 2025-11-07 18:42:48Z - Correlation ID: 809c4d36-837f-4da2-a0cf-691a50ec714f - Trace ID: 704acf2d-4fc7-4cab-a046-01e252c85b00
Error getting the secret: invalid_client: 7000222 - [2025-11-07 18:42:49Z]: 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: c33dff7d-605a-4053-a315-5975a2d65a00 Correlation ID: 81c527cd-abc4-499f-83d3-3e2a15d6fa8e Timestamp: 2025-11-07 18:42:49Z - Correlation ID: 81c527cd-abc4-499f-83d3-3e2a15d6fa8e - Trace ID: c33dff7d-605a-4053-a315-5975a2d65a00
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)