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-16 22:30:47Z]: 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: 82f57dca-e555-45d8-aca6-4434dae10800 Correlation ID: a1fe436a-b2eb-4df9-80e4-db4b40601437 Timestamp: 2025-12-16 22:30:47Z - Correlation ID: a1fe436a-b2eb-4df9-80e4-db4b40601437 - Trace ID: 82f57dca-e555-45d8-aca6-4434dae10800
(node:2156) [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-16 22:30:47Z]: 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: 48f657e5-b689-4c9a-a60e-b9bbb1db2d00 Correlation ID: 153b16b7-7893-4d6e-8f71-3bef80354fbe Timestamp: 2025-12-16 22:30:47Z - Correlation ID: 153b16b7-7893-4d6e-8f71-3bef80354fbe - Trace ID: 48f657e5-b689-4c9a-a60e-b9bbb1db2d00
Error getting the secret: invalid_client: 7000222 - [2025-12-16 22:30:48Z]: 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: 47ff2765-73d0-4eb4-a59e-144e13bc0c00 Correlation ID: 26b459fe-edfc-45da-a9e2-e0dcbc72a354 Timestamp: 2025-12-16 22:30:48Z - Correlation ID: 26b459fe-edfc-45da-a9e2-e0dcbc72a354 - Trace ID: 47ff2765-73d0-4eb4-a59e-144e13bc0c00
Error getting the secret: invalid_client: 7000222 - [2025-12-16 22:30:48Z]: 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: 1d3bc421-a884-4478-8950-ac7c4a5c0b00 Correlation ID: f5c02b7d-5219-421d-a069-056ced48415b Timestamp: 2025-12-16 22:30:48Z - Correlation ID: f5c02b7d-5219-421d-a069-056ced48415b - Trace ID: 1d3bc421-a884-4478-8950-ac7c4a5c0b00
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)