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-01-02 10:55:42Z]: 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: 4d87d203-dbc2-4474-9925-17098f7d5200 Correlation ID: 3272a931-3b6a-489d-bbff-b5a9fc433232 Timestamp: 2026-01-02 10:55:42Z - Correlation ID: 3272a931-3b6a-489d-bbff-b5a9fc433232 - Trace ID: 4d87d203-dbc2-4474-9925-17098f7d5200
(node:1768) [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-01-02 10:55:43Z]: 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: 574d05fd-ee49-45e7-bf73-5746d0fb5401 Correlation ID: a4adf167-fd98-41f4-baf7-86ed94c64c2c Timestamp: 2026-01-02 10:55:43Z - Correlation ID: a4adf167-fd98-41f4-baf7-86ed94c64c2c - Trace ID: 574d05fd-ee49-45e7-bf73-5746d0fb5401
Error getting the secret: invalid_client: 7000222 - [2026-01-02 10:55:43Z]: 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: 34021cbe-5a6c-4eaf-9c2d-b9230d163c01 Correlation ID: 5c7c8a0b-8440-4f48-bb87-b2d8f6aa4cb3 Timestamp: 2026-01-02 10:55:43Z - Correlation ID: 5c7c8a0b-8440-4f48-bb87-b2d8f6aa4cb3 - Trace ID: 34021cbe-5a6c-4eaf-9c2d-b9230d163c01
Error getting the secret: invalid_client: 7000222 - [2026-01-02 10:55:43Z]: 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: 963f22d0-8e94-446a-8f1c-175d903a2c00 Correlation ID: 743f655c-d157-4a12-b978-e935e49f8eaf Timestamp: 2026-01-02 10:55:43Z - Correlation ID: 743f655c-d157-4a12-b978-e935e49f8eaf - Trace ID: 963f22d0-8e94-446a-8f1c-175d903a2c00
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)