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-09 18:32:22Z]: 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: 2528503b-d341-4580-8149-be9433e61a00 Correlation ID: 935dedb4-02d4-46b4-ac38-323ff8649a75 Timestamp: 2026-04-09 18:32:22Z - Correlation ID: 935dedb4-02d4-46b4-ac38-323ff8649a75 - Trace ID: 2528503b-d341-4580-8149-be9433e61a00
(node:4660) [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-09 18:32:22Z]: 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: b6267592-4033-48f5-b3fb-9a1eee145500 Correlation ID: 6ba8821c-3583-45f4-a61e-13e85be69afa Timestamp: 2026-04-09 18:32:22Z - Correlation ID: 6ba8821c-3583-45f4-a61e-13e85be69afa - Trace ID: b6267592-4033-48f5-b3fb-9a1eee145500
Error getting the secret: invalid_client: 7000222 - [2026-04-09 18:32:23Z]: 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: 67069ce6-23ab-49f8-aab1-7376100c4d00 Correlation ID: 5b078b6f-2d0c-4474-a531-6edbd9e78319 Timestamp: 2026-04-09 18:32:23Z - Correlation ID: 5b078b6f-2d0c-4474-a531-6edbd9e78319 - Trace ID: 67069ce6-23ab-49f8-aab1-7376100c4d00
Error getting the secret: invalid_client: 7000222 - [2026-04-09 18:32:23Z]: 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: 9f40c873-3521-43c4-9333-ceb8f42c5b00 Correlation ID: 75e9ff4d-c2d4-4813-a437-cd80eb87d419 Timestamp: 2026-04-09 18:32:23Z - Correlation ID: 75e9ff4d-c2d4-4813-a437-cd80eb87d419 - Trace ID: 9f40c873-3521-43c4-9333-ceb8f42c5b00
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)