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-03-04 00:24:05Z]: 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: 5457aaeb-5aca-4c2b-9c72-7aa5fa221400 Correlation ID: 22ff9789-b6c5-47be-ac5d-c8d2631798eb Timestamp: 2026-03-04 00:24:05Z - Correlation ID: 22ff9789-b6c5-47be-ac5d-c8d2631798eb - Trace ID: 5457aaeb-5aca-4c2b-9c72-7aa5fa221400
(node:4256) [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-03-04 00:24:05Z]: 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: 89ea63ad-9143-4934-9587-4bb37ce91900 Correlation ID: 2549e6e8-ce79-4b33-a1d4-6920a942be19 Timestamp: 2026-03-04 00:24:05Z - Correlation ID: 2549e6e8-ce79-4b33-a1d4-6920a942be19 - Trace ID: 89ea63ad-9143-4934-9587-4bb37ce91900
Error getting the secret: invalid_client: 7000222 - [2026-03-04 00:24:05Z]: 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: d14e7ecc-d7e6-4cb3-919a-38cc02d01c00 Correlation ID: 9df64ffd-fe38-4505-80b0-5107b93a2037 Timestamp: 2026-03-04 00:24:05Z - Correlation ID: 9df64ffd-fe38-4505-80b0-5107b93a2037 - Trace ID: d14e7ecc-d7e6-4cb3-919a-38cc02d01c00
Error getting the secret: invalid_client: 7000222 - [2026-03-04 00:24:06Z]: 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: 6111f1bf-5caf-4702-b7a4-20ca37571300 Correlation ID: 69b8ce2e-a2c3-478f-9d9c-a2ae4a93d7c0 Timestamp: 2026-03-04 00:24:06Z - Correlation ID: 69b8ce2e-a2c3-478f-9d9c-a2ae4a93d7c0 - Trace ID: 6111f1bf-5caf-4702-b7a4-20ca37571300
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)