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-25 21:27: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: e3991954-ee9b-4ace-9755-179327648800 Correlation ID: be0d2310-424f-434b-b26b-8a6608f8b311 Timestamp: 2025-12-25 21:27:01Z - Correlation ID: be0d2310-424f-434b-b26b-8a6608f8b311 - Trace ID: e3991954-ee9b-4ace-9755-179327648800
(node:560) [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-25 21:27: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: fbc73f5e-16d4-499e-8a82-19406f177a00 Correlation ID: a6f221a0-e08a-4b75-ad6a-daa7d6bd3551 Timestamp: 2025-12-25 21:27:01Z - Correlation ID: a6f221a0-e08a-4b75-ad6a-daa7d6bd3551 - Trace ID: fbc73f5e-16d4-499e-8a82-19406f177a00
Error getting the secret: invalid_client: 7000222 - [2025-12-25 21:27: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: 646a3dfb-70f9-48ef-a554-78e3f9698300 Correlation ID: 663db000-d261-46fd-a38d-80025e9d6eaa Timestamp: 2025-12-25 21:27:01Z - Correlation ID: 663db000-d261-46fd-a38d-80025e9d6eaa - Trace ID: 646a3dfb-70f9-48ef-a554-78e3f9698300
Error getting the secret: invalid_client: 7000222 - [2025-12-25 21:27: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: c9ca3ee2-c215-4278-8baa-7dbdf6fc8400 Correlation ID: 0fbc0743-34d2-4857-bdc8-a8965721d137 Timestamp: 2025-12-25 21:27:02Z - Correlation ID: 0fbc0743-34d2-4857-bdc8-a8965721d137 - Trace ID: c9ca3ee2-c215-4278-8baa-7dbdf6fc8400
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)