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-03 15:42: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: 906a78f9-5218-48d5-b50a-a067a9479700 Correlation ID: 869c9612-4e3c-4f9c-ad68-6453c9578e5c Timestamp: 2026-03-03 15:42:06Z - Correlation ID: 869c9612-4e3c-4f9c-ad68-6453c9578e5c - Trace ID: 906a78f9-5218-48d5-b50a-a067a9479700
(node:2276) [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-03 15:42: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: 4cf5010a-98eb-44cc-8c53-b7da88898e00 Correlation ID: 4ea0b0f5-8dc5-4f32-b529-24fec19ee453 Timestamp: 2026-03-03 15:42:06Z - Correlation ID: 4ea0b0f5-8dc5-4f32-b529-24fec19ee453 - Trace ID: 4cf5010a-98eb-44cc-8c53-b7da88898e00
Error getting the secret: invalid_client: 7000222 - [2026-03-03 15:42: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: 3fe25d3e-39ad-4d60-bd15-f377812f2500 Correlation ID: eebb0c6d-d108-4b2a-a52f-4c9f582c334a Timestamp: 2026-03-03 15:42:07Z - Correlation ID: eebb0c6d-d108-4b2a-a52f-4c9f582c334a - Trace ID: 3fe25d3e-39ad-4d60-bd15-f377812f2500
Error getting the secret: invalid_client: 7000222 - [2026-03-03 15:42: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: 0f4d905b-a14a-49c3-b467-91d8e80f0d00 Correlation ID: efe598d8-0e1c-4488-b951-f50b4b0db09d Timestamp: 2026-03-03 15:42:07Z - Correlation ID: efe598d8-0e1c-4488-b951-f50b4b0db09d - Trace ID: 0f4d905b-a14a-49c3-b467-91d8e80f0d00
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)