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-09-27 15:35:01Z]: 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: 0fe5979e-eb2c-4569-be1a-ac87f6674a01 Correlation ID: 63afd5f5-a804-4f02-8a34-e694b5240c8c Timestamp: 2025-09-27 15:35:01Z - Correlation ID: 63afd5f5-a804-4f02-8a34-e694b5240c8c - Trace ID: 0fe5979e-eb2c-4569-be1a-ac87f6674a01
(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-09-27 15:35:01Z]: 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: 6faa28b5-d73c-40d7-8bd5-1bed537b0a00 Correlation ID: c68aef74-c253-47af-8d96-a5b85bf21b6c Timestamp: 2025-09-27 15:35:01Z - Correlation ID: c68aef74-c253-47af-8d96-a5b85bf21b6c - Trace ID: 6faa28b5-d73c-40d7-8bd5-1bed537b0a00
Error getting the secret: invalid_client: 7000222 - [2025-09-27 15:35: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: 3fdfbbbe-5695-4c3f-a623-b5ead0366800 Correlation ID: 98cbae28-e553-4bb2-9807-82b38c72d6c5 Timestamp: 2025-09-27 15:35:02Z - Correlation ID: 98cbae28-e553-4bb2-9807-82b38c72d6c5 - Trace ID: 3fdfbbbe-5695-4c3f-a623-b5ead0366800
Error getting the secret: invalid_client: 7000222 - [2025-09-27 15:35: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: 6faa28b5-d73c-40d7-8bd5-1bed737b0a00 Correlation ID: aa212962-536a-4782-ba92-b343a9735d45 Timestamp: 2025-09-27 15:35:02Z - Correlation ID: aa212962-536a-4782-ba92-b343a9735d45 - Trace ID: 6faa28b5-d73c-40d7-8bd5-1bed737b0a00
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)