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 22:36:26Z]: 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: 829b5318-caa2-474d-934a-e79a39354a00 Correlation ID: 4483674d-fe84-47c8-b6b1-46756f9a65f0 Timestamp: 2026-02-22 22:36:26Z - Correlation ID: 4483674d-fe84-47c8-b6b1-46756f9a65f0 - Trace ID: 829b5318-caa2-474d-934a-e79a39354a00
(node:1936) [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 22:36:27Z]: 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: 3d8cb387-e696-4874-8a42-6110a87a4200 Correlation ID: 38eea73f-fefa-4aa9-8cf9-845ca1eba4b3 Timestamp: 2026-02-22 22:36:27Z - Correlation ID: 38eea73f-fefa-4aa9-8cf9-845ca1eba4b3 - Trace ID: 3d8cb387-e696-4874-8a42-6110a87a4200
Error getting the secret: invalid_client: 7000222 - [2026-02-22 22:36:27Z]: 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: 5082fcfc-2e95-4817-8794-9fee7cef5300 Correlation ID: eea0378b-0a17-4fbd-b741-10a6a9811ee8 Timestamp: 2026-02-22 22:36:27Z - Correlation ID: eea0378b-0a17-4fbd-b741-10a6a9811ee8 - Trace ID: 5082fcfc-2e95-4817-8794-9fee7cef5300
Error getting the secret: invalid_client: 7000222 - [2026-02-22 22:36:27Z]: 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: 422e5a40-9dfa-4a99-8c5e-f8f1811d4c00 Correlation ID: 5c15bed5-9e0e-4595-b7df-f9a56bf2ed8d Timestamp: 2026-02-22 22:36:27Z - Correlation ID: 5c15bed5-9e0e-4595-b7df-f9a56bf2ed8d - Trace ID: 422e5a40-9dfa-4a99-8c5e-f8f1811d4c00
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)