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 - [2026-01-12 02:30:11Z]: 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: c0704e44-07a3-488d-a7eb-178db4f10000 Correlation ID: 1c4748ed-cc1b-48f2-ada5-36748a5e0a57 Timestamp: 2026-01-12 02:30:11Z - Correlation ID: 1c4748ed-cc1b-48f2-ada5-36748a5e0a57 - Trace ID: c0704e44-07a3-488d-a7eb-178db4f10000
(node:3932) [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 - [2026-01-12 02:30:11Z]: 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: 98b3233b-e6c6-4719-8b80-1ed6bead3000 Correlation ID: 40320389-83f5-4537-ab67-13944833a7c5 Timestamp: 2026-01-12 02:30:11Z - Correlation ID: 40320389-83f5-4537-ab67-13944833a7c5 - Trace ID: 98b3233b-e6c6-4719-8b80-1ed6bead3000
Error getting the secret: invalid_client: 7000222 - [2026-01-12 02:30:11Z]: 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: be2f0396-7842-4efe-bb86-018605fd4000 Correlation ID: 5b1410cc-aa50-4f08-8b7c-f24254678677 Timestamp: 2026-01-12 02:30:11Z - Correlation ID: 5b1410cc-aa50-4f08-8b7c-f24254678677 - Trace ID: be2f0396-7842-4efe-bb86-018605fd4000
Error getting the secret: invalid_client: 7000222 - [2026-01-12 02:30:11Z]: 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: bf71b2c8-3bb7-44e6-a707-0646d6f10600 Correlation ID: 3f42ac29-2ecc-4d49-8311-e89457dede36 Timestamp: 2026-01-12 02:30:11Z - Correlation ID: 3f42ac29-2ecc-4d49-8311-e89457dede36 - Trace ID: bf71b2c8-3bb7-44e6-a707-0646d6f10600
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)