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-28 11:35:35Z]: 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: 12b13d28-a9b8-4da8-b6c5-c22859cf0300 Correlation ID: 68803a1d-5901-4c67-97d0-42c6739ef2bd Timestamp: 2026-03-28 11:35:35Z - Correlation ID: 68803a1d-5901-4c67-97d0-42c6739ef2bd - Trace ID: 12b13d28-a9b8-4da8-b6c5-c22859cf0300
(node:4824) [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-28 11:35:36Z]: 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: 1251509e-64d6-4bd4-b97b-f84e5b5c1b00 Correlation ID: a41bf08c-2ad0-4bb9-8ff5-5537c53c2d74 Timestamp: 2026-03-28 11:35:36Z - Correlation ID: a41bf08c-2ad0-4bb9-8ff5-5537c53c2d74 - Trace ID: 1251509e-64d6-4bd4-b97b-f84e5b5c1b00
Error getting the secret: invalid_client: 7000222 - [2026-03-28 11:35:36Z]: 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: 4e85847c-9da7-4b11-b394-d7c8e7420500 Correlation ID: 0252a78e-eb20-4502-b906-7565c7bea2b6 Timestamp: 2026-03-28 11:35:36Z - Correlation ID: 0252a78e-eb20-4502-b906-7565c7bea2b6 - Trace ID: 4e85847c-9da7-4b11-b394-d7c8e7420500
Error getting the secret: invalid_client: 7000222 - [2026-03-28 11:35:36Z]: 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: 56c2c5b3-a78a-4856-932a-82671e0d0500 Correlation ID: eca2536d-c598-417c-9c51-69201b9aa544 Timestamp: 2026-03-28 11:35:36Z - Correlation ID: eca2536d-c598-417c-9c51-69201b9aa544 - Trace ID: 56c2c5b3-a78a-4856-932a-82671e0d0500
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)