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-22 19:30: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: a48168df-054d-4c58-817e-7fa3b9f05000 Correlation ID: 23605068-1eb7-4015-9082-56394b694eae Timestamp: 2026-02-22 19:30:01Z - Correlation ID: 23605068-1eb7-4015-9082-56394b694eae - Trace ID: a48168df-054d-4c58-817e-7fa3b9f05000
(node:5676) [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-22 19:30: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: 6f3e4e7d-ee00-45e6-acf6-75b402034900 Correlation ID: 0b1d26fc-ff0d-4317-8471-58231c568998 Timestamp: 2026-02-22 19:30:01Z - Correlation ID: 0b1d26fc-ff0d-4317-8471-58231c568998 - Trace ID: 6f3e4e7d-ee00-45e6-acf6-75b402034900
Error getting the secret: invalid_client: 7000222 - [2026-02-22 19:30: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: 6f848095-50c5-488d-8a13-a962e47f4800 Correlation ID: 9f056bb4-3d1c-4419-a1d6-a3e5246fdb40 Timestamp: 2026-02-22 19:30:01Z - Correlation ID: 9f056bb4-3d1c-4419-a1d6-a3e5246fdb40 - Trace ID: 6f848095-50c5-488d-8a13-a962e47f4800
Error getting the secret: invalid_client: 7000222 - [2026-02-22 19:30:02Z]: 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: f18a58c3-f219-417c-8717-f5342f313900 Correlation ID: f5357f79-91af-498a-b8b2-b207d23019bf Timestamp: 2026-02-22 19:30:02Z - Correlation ID: f5357f79-91af-498a-b8b2-b207d23019bf - Trace ID: f18a58c3-f219-417c-8717-f5342f313900
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)