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-09 04:39:54Z]: 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: d254ef03-a7ed-4d46-b4b4-3f0fffd13900 Correlation ID: d8b4986f-343b-4d7e-bc11-d6e31f583377 Timestamp: 2025-12-09 04:39:54Z - Correlation ID: d8b4986f-343b-4d7e-bc11-d6e31f583377 - Trace ID: d254ef03-a7ed-4d46-b4b4-3f0fffd13900
(node:2664) [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-09 04:39:55Z]: 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: b20c4f9b-1d3f-449c-ad47-e8eb6f080c00 Correlation ID: fb8c082d-1332-40ee-a074-3296cd5eea0d Timestamp: 2025-12-09 04:39:55Z - Correlation ID: fb8c082d-1332-40ee-a074-3296cd5eea0d - Trace ID: b20c4f9b-1d3f-449c-ad47-e8eb6f080c00
Error getting the secret: invalid_client: 7000222 - [2025-12-09 04:39:55Z]: 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: 7d29d6f5-e928-4497-b5d7-9ee38f490c00 Correlation ID: 33223ed3-5ac5-426a-947e-165ecdde0550 Timestamp: 2025-12-09 04:39:55Z - Correlation ID: 33223ed3-5ac5-426a-947e-165ecdde0550 - Trace ID: 7d29d6f5-e928-4497-b5d7-9ee38f490c00
Error getting the secret: invalid_client: 7000222 - [2025-12-09 04:39:55Z]: 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: 526a9236-e68e-45ac-b374-3dc79d3b0400 Correlation ID: 6c46051f-492e-4c75-9333-95fa4f7ac81b Timestamp: 2025-12-09 04:39:55Z - Correlation ID: 6c46051f-492e-4c75-9333-95fa4f7ac81b - Trace ID: 526a9236-e68e-45ac-b374-3dc79d3b0400
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)