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-30 12:32:22Z]: 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: 8b7caa11-4786-4048-88f8-c66bfd261000 Correlation ID: bc336898-4566-420e-8704-d85619b29ac1 Timestamp: 2025-09-30 12:32:22Z - Correlation ID: bc336898-4566-420e-8704-d85619b29ac1 - Trace ID: 8b7caa11-4786-4048-88f8-c66bfd261000
(node:5424) [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-30 12:32:22Z]: 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: 193b04e5-c17e-4ae2-9e33-9dfc10064300 Correlation ID: bc5b96bf-aee6-4df3-8e4a-5d18b005b590 Timestamp: 2025-09-30 12:32:22Z - Correlation ID: bc5b96bf-aee6-4df3-8e4a-5d18b005b590 - Trace ID: 193b04e5-c17e-4ae2-9e33-9dfc10064300
Error getting the secret: invalid_client: 7000222 - [2025-09-30 12:32: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: ddc02655-e4e7-4db5-84cf-b1e90efb1200 Correlation ID: 42768229-84b6-421b-b538-1f9e7c9fa435 Timestamp: 2025-09-30 12:32:23Z - Correlation ID: 42768229-84b6-421b-b538-1f9e7c9fa435 - Trace ID: ddc02655-e4e7-4db5-84cf-b1e90efb1200
Error getting the secret: invalid_client: 7000222 - [2025-09-30 12:32: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: ba575102-6f90-42fb-8c19-a36779981100 Correlation ID: 6aecbcdc-8882-4dfe-ac34-a9d16352e51b Timestamp: 2025-09-30 12:32:23Z - Correlation ID: 6aecbcdc-8882-4dfe-ac34-a9d16352e51b - Trace ID: ba575102-6f90-42fb-8c19-a36779981100
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)