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-04-13 18:04: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: b7dde63a-1371-4546-afa1-4ae059ce4300 Correlation ID: eb96b465-4566-4a6c-9783-3e4a0f00de15 Timestamp: 2026-04-13 18:04:05Z - Correlation ID: eb96b465-4566-4a6c-9783-3e4a0f00de15 - Trace ID: b7dde63a-1371-4546-afa1-4ae059ce4300
(node:3580) [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-04-13 18:04: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: 8d90970c-56c6-4a2f-a113-e58ac3a43a00 Correlation ID: c2a2fba0-c790-4e67-b80e-1d31b7206395 Timestamp: 2026-04-13 18:04:05Z - Correlation ID: c2a2fba0-c790-4e67-b80e-1d31b7206395 - Trace ID: 8d90970c-56c6-4a2f-a113-e58ac3a43a00
Error getting the secret: invalid_client: 7000222 - [2026-04-13 18:04: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: 93ffcc32-f0ea-4bd3-904b-faa1b3b40f00 Correlation ID: bc4d42b6-6f6f-4dab-b75d-05ad0c125923 Timestamp: 2026-04-13 18:04:06Z - Correlation ID: bc4d42b6-6f6f-4dab-b75d-05ad0c125923 - Trace ID: 93ffcc32-f0ea-4bd3-904b-faa1b3b40f00
Error getting the secret: invalid_client: 7000222 - [2026-04-13 18:04: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: 525f95a9-4400-4835-b350-cd262de33f00 Correlation ID: eb82c72e-6f41-4d01-a8b8-9ef6f8c1d0e6 Timestamp: 2026-04-13 18:04:06Z - Correlation ID: eb82c72e-6f41-4d01-a8b8-9ef6f8c1d0e6 - Trace ID: 525f95a9-4400-4835-b350-cd262de33f00
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)