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-07 15:24:21Z]: 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: 0e70b0ed-259a-4652-bcfd-7f9158305c00 Correlation ID: 5876c094-75f5-43c0-a1d2-21564718e5be Timestamp: 2026-03-07 15:24:21Z - Correlation ID: 5876c094-75f5-43c0-a1d2-21564718e5be - Trace ID: 0e70b0ed-259a-4652-bcfd-7f9158305c00
(node:1312) [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-07 15:24:21Z]: 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: 7ba1723b-fcc1-416b-b38a-748a2fa18400 Correlation ID: d556fcd0-c285-4189-92ce-92daad792a0f Timestamp: 2026-03-07 15:24:21Z - Correlation ID: d556fcd0-c285-4189-92ce-92daad792a0f - Trace ID: 7ba1723b-fcc1-416b-b38a-748a2fa18400
Error getting the secret: invalid_client: 7000222 - [2026-03-07 15:24:21Z]: 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: 44185f78-63e7-456e-aa7b-e1a817d33d00 Correlation ID: b3443ca5-3756-411a-9542-f5f27b278bd2 Timestamp: 2026-03-07 15:24:21Z - Correlation ID: b3443ca5-3756-411a-9542-f5f27b278bd2 - Trace ID: 44185f78-63e7-456e-aa7b-e1a817d33d00
Error getting the secret: invalid_client: 7000222 - [2026-03-07 15:24:22Z]: 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: e97e848b-d876-4132-954a-d7d67eee0f01 Correlation ID: c5e92a9a-f156-4eed-af36-fca996a6d924 Timestamp: 2026-03-07 15:24:22Z - Correlation ID: c5e92a9a-f156-4eed-af36-fca996a6d924 - Trace ID: e97e848b-d876-4132-954a-d7d67eee0f01
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)