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 06:32:06Z]: 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: b1d61094-8ed0-4cc8-93bd-a054b7935900 Correlation ID: 9cff4f7b-0972-4a99-85ce-ebe51a960867 Timestamp: 2026-04-10 06:32:06Z - Correlation ID: 9cff4f7b-0972-4a99-85ce-ebe51a960867 - Trace ID: b1d61094-8ed0-4cc8-93bd-a054b7935900
(node:1656) [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 06:32:06Z]: 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: e00add15-8ff1-473b-a097-7b4e0d7e5b00 Correlation ID: 5a55b58b-1d84-448d-bd9a-1eb1a3b92f14 Timestamp: 2026-04-10 06:32:06Z - Correlation ID: 5a55b58b-1d84-448d-bd9a-1eb1a3b92f14 - Trace ID: e00add15-8ff1-473b-a097-7b4e0d7e5b00
Error getting the secret: invalid_client: 7000222 - [2026-04-10 06:32:07Z]: 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: 61742de7-c7c1-4c6d-b835-02813c900b00 Correlation ID: 4f427220-34b4-42c1-be41-ba8941dafbd2 Timestamp: 2026-04-10 06:32:07Z - Correlation ID: 4f427220-34b4-42c1-be41-ba8941dafbd2 - Trace ID: 61742de7-c7c1-4c6d-b835-02813c900b00
Error getting the secret: invalid_client: 7000222 - [2026-04-10 06:32:07Z]: 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: dd2402be-d424-42cb-b487-0e4a5f555600 Correlation ID: 355be717-e43a-43ab-bb44-d52dac80f614 Timestamp: 2026-04-10 06:32:07Z - Correlation ID: 355be717-e43a-43ab-bb44-d52dac80f614 - Trace ID: dd2402be-d424-42cb-b487-0e4a5f555600
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)