Process usage quota error from Duo Workflow Service

What does this MR do and why?

This is a solution for https://gitlab.com/gitlab-org/gitlab/-/work_items/581737

We need to process an error about insufficient usage quota that is coming from Duo Workflow Service. We need to close the WebSocket connection and send an error code that FE can process.

References

https://gitlab.com/gitlab-org/gitlab/-/work_items/581737

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Setup mocks for customer portal by using this instruction https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/duo_agent_platform.md?ref_type=heads#optional-configure-mock-server-for-usage-quota-checks
  2. Pull this branch and do cd workhorse from project root directory.
  3. Compile workhorse by make command in your terminal
  4. Go to browser and inspect the network connection
  5. Write something in the chat
  6. See that the WS connection is closed with error code 1008. Note: try Chrome or Firefox. Safari doesn't show error code.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

This MR is proudly build with use of Agentic Duo Chat.

Merge request reports

Loading