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-02-24 13:31:00Z]: 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: 55931164-3c9b-4d15-a8f6-84777ed63d00 Correlation ID: 9fcdb0ae-7b83-4500-a2ab-856c6598510d Timestamp: 2026-02-24 13:31:00Z - Correlation ID: 9fcdb0ae-7b83-4500-a2ab-856c6598510d - Trace ID: 55931164-3c9b-4d15-a8f6-84777ed63d00
(node:4568) [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-02-24 13:31:00Z]: 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: fa1eb049-93cd-4562-8a3d-465c67173a00 Correlation ID: 1ff64cf4-ba7c-42a7-917a-73af4ca57f6d Timestamp: 2026-02-24 13:31:00Z - Correlation ID: 1ff64cf4-ba7c-42a7-917a-73af4ca57f6d - Trace ID: fa1eb049-93cd-4562-8a3d-465c67173a00
Error getting the secret: invalid_client: 7000222 - [2026-02-24 13:31:00Z]: 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: 9e50671d-2a85-4c6c-a583-42d1d5a40200 Correlation ID: bb565356-3afe-44d9-95b5-127ffc9915f2 Timestamp: 2026-02-24 13:31:00Z - Correlation ID: bb565356-3afe-44d9-95b5-127ffc9915f2 - Trace ID: 9e50671d-2a85-4c6c-a583-42d1d5a40200
Error getting the secret: invalid_client: 7000222 - [2026-02-24 13:31:01Z]: 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: 5bc7485b-a1e2-4729-956f-185206bd1900 Correlation ID: 6e46ead4-fdfe-42e2-987c-10e53c90f853 Timestamp: 2026-02-24 13:31:01Z - Correlation ID: 6e46ead4-fdfe-42e2-987c-10e53c90f853 - Trace ID: 5bc7485b-a1e2-4729-956f-185206bd1900
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)