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 14:50: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: 04fb6173-0c4a-4368-8c34-7a2fc3376c00 Correlation ID: 09e0e455-ac9e-48af-8896-01c62af39a7d Timestamp: 2026-03-06 14:50:06Z - Correlation ID: 09e0e455-ac9e-48af-8896-01c62af39a7d - Trace ID: 04fb6173-0c4a-4368-8c34-7a2fc3376c00
(node:1192) [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 14:50: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: ff960d61-025b-42e0-9cee-a8cca37cda00 Correlation ID: 71774d3d-0a8e-475c-bbee-1d9f84d3ca7a Timestamp: 2026-03-06 14:50:06Z - Correlation ID: 71774d3d-0a8e-475c-bbee-1d9f84d3ca7a - Trace ID: ff960d61-025b-42e0-9cee-a8cca37cda00
Error getting the secret: invalid_client: 7000222 - [2026-03-06 14:50: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: 03a43b51-5ba4-40f2-95ba-b7d14c7ce800 Correlation ID: a648d9d8-13e3-495f-a463-f801d34106a2 Timestamp: 2026-03-06 14:50:07Z - Correlation ID: a648d9d8-13e3-495f-a463-f801d34106a2 - Trace ID: 03a43b51-5ba4-40f2-95ba-b7d14c7ce800
Error getting the secret: invalid_client: 7000222 - [2026-03-06 14:50: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: 1f3e6bd1-d5ba-4045-97f0-043485d24600 Correlation ID: 669a0800-a4bc-4a0b-900c-6823115c2b14 Timestamp: 2026-03-06 14:50:07Z - Correlation ID: 669a0800-a4bc-4a0b-900c-6823115c2b14 - Trace ID: 1f3e6bd1-d5ba-4045-97f0-043485d24600
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)