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-04-27 06:35: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: 4675be83-0167-42dd-aaff-12a8ebd76700 Correlation ID: b8cbc5fb-ebe8-4261-9278-eb82fb619f0f Timestamp: 2026-04-27 06:35:07Z - Correlation ID: b8cbc5fb-ebe8-4261-9278-eb82fb619f0f - Trace ID: 4675be83-0167-42dd-aaff-12a8ebd76700
(node:4400) [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-04-27 06:35: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: 60fbca5b-6645-4f14-83d5-b40aad7a3400 Correlation ID: 26c521f0-8d36-4dc3-a33e-99b0d9ea88a6 Timestamp: 2026-04-27 06:35:07Z - Correlation ID: 26c521f0-8d36-4dc3-a33e-99b0d9ea88a6 - Trace ID: 60fbca5b-6645-4f14-83d5-b40aad7a3400
Error getting the secret: invalid_client: 7000222 - [2026-04-27 06:35: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: a88a743b-9b78-454b-9223-9976754e3700 Correlation ID: 5f20482a-567c-4ef7-bec9-5aa0b606cfb2 Timestamp: 2026-04-27 06:35:07Z - Correlation ID: 5f20482a-567c-4ef7-bec9-5aa0b606cfb2 - Trace ID: a88a743b-9b78-454b-9223-9976754e3700
Error getting the secret: invalid_client: 7000222 - [2026-04-27 06:35:08Z]: 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: 8c76b518-e5a2-4fb1-8349-97ee227b6100 Correlation ID: 6f29bb63-edaa-47e1-8cb3-32bcb1455340 Timestamp: 2026-04-27 06:35:08Z - Correlation ID: 6f29bb63-edaa-47e1-8cb3-32bcb1455340 - Trace ID: 8c76b518-e5a2-4fb1-8349-97ee227b6100
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)