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-03-06 22:36:34Z]: 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: ad537e39-1919-41b2-b3cd-79bfa0f04800 Correlation ID: cae07280-6446-402c-912a-7c790597652c Timestamp: 2026-03-06 22:36:34Z - Correlation ID: cae07280-6446-402c-912a-7c790597652c - Trace ID: ad537e39-1919-41b2-b3cd-79bfa0f04800
(node:5788) [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-03-06 22:36:34Z]: 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: d544d739-5b5d-42f9-8c07-afdfd10b1100 Correlation ID: c4a15646-977b-432b-be9f-57db4cf4af49 Timestamp: 2026-03-06 22:36:34Z - Correlation ID: c4a15646-977b-432b-be9f-57db4cf4af49 - Trace ID: d544d739-5b5d-42f9-8c07-afdfd10b1100
Error getting the secret: invalid_client: 7000222 - [2026-03-06 22:36:35Z]: 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: e7edd291-93fe-4da7-8269-e4eaf49e6a00 Correlation ID: 7868b379-96a7-4a04-8cfe-02cdf6099ae7 Timestamp: 2026-03-06 22:36:35Z - Correlation ID: 7868b379-96a7-4a04-8cfe-02cdf6099ae7 - Trace ID: e7edd291-93fe-4da7-8269-e4eaf49e6a00
Error getting the secret: invalid_client: 7000222 - [2026-03-06 22:36:35Z]: 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: e3206aca-b9f3-4a72-a245-01c64dbd4a00 Correlation ID: 28389554-4f7d-4519-b3fd-7d74ae6763ee Timestamp: 2026-03-06 22:36:35Z - Correlation ID: 28389554-4f7d-4519-b3fd-7d74ae6763ee - Trace ID: e3206aca-b9f3-4a72-a245-01c64dbd4a00
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)