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-11 13:29:32Z]: 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: 5ba70e6d-dd44-45b6-8015-57eb6c2a3300 Correlation ID: 59ffc46b-371c-4c1d-a0af-026ef0f67b0f Timestamp: 2025-12-11 13:29:32Z - Correlation ID: 59ffc46b-371c-4c1d-a0af-026ef0f67b0f - Trace ID: 5ba70e6d-dd44-45b6-8015-57eb6c2a3300
(node:3860) [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-11 13:29:33Z]: 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: 68c8d53c-de34-42b5-8a17-b1d2e4b63b00 Correlation ID: 15b0f33c-bcf1-41c4-ab53-1e6434503d48 Timestamp: 2025-12-11 13:29:33Z - Correlation ID: 15b0f33c-bcf1-41c4-ab53-1e6434503d48 - Trace ID: 68c8d53c-de34-42b5-8a17-b1d2e4b63b00
Error getting the secret: invalid_client: 7000222 - [2025-12-11 13:29:33Z]: 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: bf2fbd3a-cbc7-44ab-b2cd-996679315400 Correlation ID: 45c07bcf-74cb-4795-bfef-215676c618eb Timestamp: 2025-12-11 13:29:33Z - Correlation ID: 45c07bcf-74cb-4795-bfef-215676c618eb - Trace ID: bf2fbd3a-cbc7-44ab-b2cd-996679315400
Error getting the secret: invalid_client: 7000222 - [2025-12-11 13:29:33Z]: 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: a75f3e2d-2ff2-4be0-948c-4e5f79a40500 Correlation ID: b330849c-9ff2-45d2-95b6-cfe2f0b57fbb Timestamp: 2025-12-11 13:29:33Z - Correlation ID: b330849c-9ff2-45d2-95b6-cfe2f0b57fbb - Trace ID: a75f3e2d-2ff2-4be0-948c-4e5f79a40500
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)