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-28 01:43:03Z]: 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: 2bb86868-439d-4b8d-9589-5381d3c71600 Correlation ID: 24ca4d85-705d-43de-af8a-27803887b17b Timestamp: 2026-04-28 01:43:03Z - Correlation ID: 24ca4d85-705d-43de-af8a-27803887b17b - Trace ID: 2bb86868-439d-4b8d-9589-5381d3c71600
(node:4880) [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-28 01:43:03Z]: 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: 06d8b063-c051-455e-a586-ea233b254700 Correlation ID: e3d6198f-bde2-4ec6-a877-53bfdb44a0fb Timestamp: 2026-04-28 01:43:03Z - Correlation ID: e3d6198f-bde2-4ec6-a877-53bfdb44a0fb - Trace ID: 06d8b063-c051-455e-a586-ea233b254700
Error getting the secret: invalid_client: 7000222 - [2026-04-28 01:43:03Z]: 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: d604c3ed-5c68-42a9-9d44-3d3c14b15100 Correlation ID: e7ffc1db-9c04-4eb2-9141-fc186316a20b Timestamp: 2026-04-28 01:43:03Z - Correlation ID: e7ffc1db-9c04-4eb2-9141-fc186316a20b - Trace ID: d604c3ed-5c68-42a9-9d44-3d3c14b15100
Error getting the secret: invalid_client: 7000222 - [2026-04-28 01:43:04Z]: 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: 1303bab8-a371-4576-892f-1953ede14e00 Correlation ID: 8f26ae88-356b-4726-87e0-b99507af3821 Timestamp: 2026-04-28 01:43:04Z - Correlation ID: 8f26ae88-356b-4726-87e0-b99507af3821 - Trace ID: 1303bab8-a371-4576-892f-1953ede14e00
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)