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-17 02:23:44Z]: 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: fd42af8b-53b3-4266-92b0-3ba605165f00 Correlation ID: 53a5fa05-76f8-450a-90e3-7ea7af93d34c Timestamp: 2026-04-17 02:23:44Z - Correlation ID: 53a5fa05-76f8-450a-90e3-7ea7af93d34c - Trace ID: fd42af8b-53b3-4266-92b0-3ba605165f00
(node:6076) [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-17 02:23:44Z]: 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: 89e682ce-2a0e-4af8-a370-d94de6710000 Correlation ID: 565b913b-0b4b-44fd-b311-52d828cbf849 Timestamp: 2026-04-17 02:23:44Z - Correlation ID: 565b913b-0b4b-44fd-b311-52d828cbf849 - Trace ID: 89e682ce-2a0e-4af8-a370-d94de6710000
Error getting the secret: invalid_client: 7000222 - [2026-04-17 02:23:44Z]: 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: 9a49a286-a1b0-4a55-a7d8-f8ed9f500b00 Correlation ID: 73c21e2b-bebe-4428-b0db-89272b353830 Timestamp: 2026-04-17 02:23:44Z - Correlation ID: 73c21e2b-bebe-4428-b0db-89272b353830 - Trace ID: 9a49a286-a1b0-4a55-a7d8-f8ed9f500b00
Error getting the secret: invalid_client: 7000222 - [2026-04-17 02:23:44Z]: 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: 4a25a65c-b326-4ab6-a128-0bec96ef2400 Correlation ID: 3d12140b-da85-4793-a4bf-c2b9ce0f6f0e Timestamp: 2026-04-17 02:23:44Z - Correlation ID: 3d12140b-da85-4793-a4bf-c2b9ce0f6f0e - Trace ID: 4a25a65c-b326-4ab6-a128-0bec96ef2400
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)