Skip to content

Give the configurations response error messages #774

Open
@dhinrichs-scottlogic

Description

@dhinrichs-scottlogic

Bug report

Description

We currently don't have a mechanism to display to the user that the backend call for the configurations failed.
When the backend isn't responding, the configuration buttons can't be toggled, but there is no indication as to why.

Acceptance criteria

GIVEN the frontend is running but the backend isn't
WHEN a user toggles a defence on/off, changes the GPT model or updates a config input
THEN they get an info message in the chat telling them that there is an error

Reproduction steps

Steps to reproduce the behaviour:

  1. Start the backend and frontend
  2. Go to the sandbox and toggle one of the defences (e.g. Character Limit) on. You will see a message in the chatbox saying "character limit defence activated" and in the networks tab of the dev tools you will see the 200 code that your request was successful.
  3. Turn your backend off. Try to turn any of the defences on or off.
  4. Observe that the buttons cannot be toggled, that there is the correct error response in the network, but there is no message in the UI indicating why the buttons can't be toggled, that the backend request wasn't successful.

Expected behaviour

Given the user tries to adjust the defences (on/off, changing the input, adjusting the sliders, changing the model)
When the backend request for the configuration update is failing
Then the user receives an error message in the chatbox.

Screenshots

Image

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew tickets to be checked by the maintainers

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions