Description
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:
- Start the backend and frontend
- 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.
- Turn your backend off. Try to turn any of the defences on or off.
- 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
Additional context
Add any other context about the problem here.