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-31 18:30:20Z]: 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: e3620c66-398f-4bea-8e00-118fe7300b00 Correlation ID: 1810bfc6-fdd7-4baa-bf9c-e80fa68ae8cd Timestamp: 2026-03-31 18:30:20Z - Correlation ID: 1810bfc6-fdd7-4baa-bf9c-e80fa68ae8cd - Trace ID: e3620c66-398f-4bea-8e00-118fe7300b00
(node:5736) [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-31 18:30: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: 18c3a3a5-d64b-49fb-8863-d0219d841c00 Correlation ID: 28b61652-a94a-4a2c-993c-7f46317b7c95 Timestamp: 2026-03-31 18:30:21Z - Correlation ID: 28b61652-a94a-4a2c-993c-7f46317b7c95 - Trace ID: 18c3a3a5-d64b-49fb-8863-d0219d841c00
Error getting the secret: invalid_client: 7000222 - [2026-03-31 18:30: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: 61d555d2-edfa-439a-9776-d4f79af66900 Correlation ID: 315af60f-e591-44fd-9819-795cfe368330 Timestamp: 2026-03-31 18:30:21Z - Correlation ID: 315af60f-e591-44fd-9819-795cfe368330 - Trace ID: 61d555d2-edfa-439a-9776-d4f79af66900
Error getting the secret: invalid_client: 7000222 - [2026-03-31 18:30: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: 24c93035-1a1f-437d-9581-04a88dbe4f00 Correlation ID: 61905f85-ca84-40b6-b385-09d94eacdad0 Timestamp: 2026-03-31 18:30:21Z - Correlation ID: 61905f85-ca84-40b6-b385-09d94eacdad0 - Trace ID: 24c93035-1a1f-437d-9581-04a88dbe4f00
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)