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-10 09:20:45Z]: 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: 9a1edce6-7ef8-4ef4-be4e-7a728cc16600 Correlation ID: f150faeb-348c-4211-b965-033678301feb Timestamp: 2026-04-10 09:20:45Z - Correlation ID: f150faeb-348c-4211-b965-033678301feb - Trace ID: 9a1edce6-7ef8-4ef4-be4e-7a728cc16600
(node:3524) [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-10 09:20:45Z]: 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: 47ce2826-dd7a-4c44-a884-fabcb6f55800 Correlation ID: 3dae52a2-9a61-4f5f-89cc-24205d9e3850 Timestamp: 2026-04-10 09:20:45Z - Correlation ID: 3dae52a2-9a61-4f5f-89cc-24205d9e3850 - Trace ID: 47ce2826-dd7a-4c44-a884-fabcb6f55800
Error getting the secret: invalid_client: 7000222 - [2026-04-10 09:20:46Z]: 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: 89a9dc18-2d40-44c7-b9cf-4e7251b70400 Correlation ID: 0d15887f-c44a-4a54-91c4-771bf84a34d1 Timestamp: 2026-04-10 09:20:46Z - Correlation ID: 0d15887f-c44a-4a54-91c4-771bf84a34d1 - Trace ID: 89a9dc18-2d40-44c7-b9cf-4e7251b70400
Error getting the secret: invalid_client: 7000222 - [2026-04-10 09:20:46Z]: 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: 381be152-094c-449a-8ac8-517518611000 Correlation ID: a69ab8be-54b8-4c39-a0aa-c8be3f34b8fd Timestamp: 2026-04-10 09:20:46Z - Correlation ID: a69ab8be-54b8-4c39-a0aa-c8be3f34b8fd - Trace ID: 381be152-094c-449a-8ac8-517518611000
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)