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-16 04:23:53Z]: 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: 9ef9a20b-bb8c-4634-bf0c-4ed9a1a50300 Correlation ID: a1fe3e44-adb9-42d9-be13-790b36fe8d74 Timestamp: 2026-04-16 04:23:53Z - Correlation ID: a1fe3e44-adb9-42d9-be13-790b36fe8d74 - Trace ID: 9ef9a20b-bb8c-4634-bf0c-4ed9a1a50300
(node:5128) [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-16 04:23:53Z]: 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: 1f732a75-1f88-4f5e-a9c4-4a5f30921a00 Correlation ID: 22c36cc6-6165-462e-8d57-375e4e084422 Timestamp: 2026-04-16 04:23:53Z - Correlation ID: 22c36cc6-6165-462e-8d57-375e4e084422 - Trace ID: 1f732a75-1f88-4f5e-a9c4-4a5f30921a00
Error getting the secret: invalid_client: 7000222 - [2026-04-16 04:23:53Z]: 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: a6552388-4f9f-41f0-8c7a-d38967c33700 Correlation ID: 77770f9c-7788-4527-91ff-65ad9723979a Timestamp: 2026-04-16 04:23:53Z - Correlation ID: 77770f9c-7788-4527-91ff-65ad9723979a - Trace ID: a6552388-4f9f-41f0-8c7a-d38967c33700
Error getting the secret: invalid_client: 7000222 - [2026-04-16 04:23:54Z]: 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: 1f732a75-1f88-4f5e-a9c4-4a5f34921a00 Correlation ID: 0a9f2ba2-762f-4833-b88f-c50ea924d6c5 Timestamp: 2026-04-16 04:23:54Z - Correlation ID: 0a9f2ba2-762f-4833-b88f-c50ea924d6c5 - Trace ID: 1f732a75-1f88-4f5e-a9c4-4a5f34921a00
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)