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-29 18:27:00Z]: 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: 8bfba341-fbbd-4535-8aa1-acbd9793f000 Correlation ID: dfbe797e-f9d2-4ed6-8c24-b285ef4d767c Timestamp: 2025-12-29 18:27:00Z - Correlation ID: dfbe797e-f9d2-4ed6-8c24-b285ef4d767c - Trace ID: 8bfba341-fbbd-4535-8aa1-acbd9793f000
(node:4704) [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-29 18:27:00Z]: 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: 8256b743-f173-4d23-9897-b16ae6f67e00 Correlation ID: b9ea422a-e88d-49e0-a8fa-8ff6476e3e01 Timestamp: 2025-12-29 18:27:00Z - Correlation ID: b9ea422a-e88d-49e0-a8fa-8ff6476e3e01 - Trace ID: 8256b743-f173-4d23-9897-b16ae6f67e00
Error getting the secret: invalid_client: 7000222 - [2025-12-29 18: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: c2a1dfd7-d373-466f-b387-884de9b31001 Correlation ID: c7a789a5-8d98-4b47-8230-76819f4f9d66 Timestamp: 2025-12-29 18:27:01Z - Correlation ID: c7a789a5-8d98-4b47-8230-76819f4f9d66 - Trace ID: c2a1dfd7-d373-466f-b387-884de9b31001
Error getting the secret: invalid_client: 7000222 - [2025-12-29 18: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: ffff1cf7-520d-433a-9bbb-db482590e400 Correlation ID: 55ecf261-6174-44d7-b4e1-d87f6661d9c7 Timestamp: 2025-12-29 18:27:01Z - Correlation ID: 55ecf261-6174-44d7-b4e1-d87f6661d9c7 - Trace ID: ffff1cf7-520d-433a-9bbb-db482590e400
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)