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-30 06:24: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: 7ed17c0c-e2dc-4085-90d1-236a52f7f800 Correlation ID: 332ae608-005b-4411-a61f-b20f3bc9eb4f Timestamp: 2025-12-30 06:24:02Z - Correlation ID: 332ae608-005b-4411-a61f-b20f3bc9eb4f - Trace ID: 7ed17c0c-e2dc-4085-90d1-236a52f7f800
(node:1328) [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-30 06:24:03Z]: 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: 477ca134-6b1b-4f0a-8586-65af04c90001 Correlation ID: 497c6235-089f-4084-a2ae-814d0102526f Timestamp: 2025-12-30 06:24:03Z - Correlation ID: 497c6235-089f-4084-a2ae-814d0102526f - Trace ID: 477ca134-6b1b-4f0a-8586-65af04c90001
Error getting the secret: invalid_client: 7000222 - [2025-12-30 06:24:03Z]: 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: 814d12ea-1f5e-4cf3-9c52-99cc33effb00 Correlation ID: 12eecabb-4d77-4bfc-83c1-ff774071d93a Timestamp: 2025-12-30 06:24:03Z - Correlation ID: 12eecabb-4d77-4bfc-83c1-ff774071d93a - Trace ID: 814d12ea-1f5e-4cf3-9c52-99cc33effb00
Error getting the secret: invalid_client: 7000222 - [2025-12-30 06:24:03Z]: 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: 4f093ed9-88ab-4be5-b464-9c7eb020d500 Correlation ID: 7aebce3e-102c-4589-9d27-f7aa2645c2e5 Timestamp: 2025-12-30 06:24:03Z - Correlation ID: 7aebce3e-102c-4589-9d27-f7aa2645c2e5 - Trace ID: 4f093ed9-88ab-4be5-b464-9c7eb020d500
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)