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-05-02 11:19:53Z]: 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: 90d90eaa-006b-49d5-8ddf-7bb00de43c00 Correlation ID: 5830978e-a212-4d12-81af-3f5bafe72fc9 Timestamp: 2026-05-02 11:19:53Z - Correlation ID: 5830978e-a212-4d12-81af-3f5bafe72fc9 - Trace ID: 90d90eaa-006b-49d5-8ddf-7bb00de43c00
(node:1472) [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-05-02 11:19:53Z]: 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: c5468ac6-ae54-4a00-95e2-cf7aa7ac3800 Correlation ID: 41f89092-6ba8-45b3-92d1-0100028f6954 Timestamp: 2026-05-02 11:19:53Z - Correlation ID: 41f89092-6ba8-45b3-92d1-0100028f6954 - Trace ID: c5468ac6-ae54-4a00-95e2-cf7aa7ac3800
Error getting the secret: invalid_client: 7000222 - [2026-05-02 11:19:54Z]: 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: 7c6b7451-0d8d-4db0-a846-893c03743600 Correlation ID: 93ebe0ea-4820-4301-b851-5ddcba699ae4 Timestamp: 2026-05-02 11:19:54Z - Correlation ID: 93ebe0ea-4820-4301-b851-5ddcba699ae4 - Trace ID: 7c6b7451-0d8d-4db0-a846-893c03743600
Error getting the secret: invalid_client: 7000222 - [2026-05-02 11:19:54Z]: 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: c5468ac6-ae54-4a00-95e2-cf7ab5ac3800 Correlation ID: 49ae6a9d-07d5-42e6-9a57-990218335b5e Timestamp: 2026-05-02 11:19:54Z - Correlation ID: 49ae6a9d-07d5-42e6-9a57-990218335b5e - Trace ID: c5468ac6-ae54-4a00-95e2-cf7ab5ac3800
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)