kubeapps
kubeapps copied to clipboard
[repository] UI edit dialog does not report any backend errors
Describe the bug
When creating a new repository that results in a backend error, the create modal dialog remains open and displays the error from the backend, allowing users to correct any mistake and click create again. But when editing the repository, the modal dialog does not stay open if there is a backend error. Instead it just closes as if everything went fine and there is no indication to the user that the repository was in fact not updated.
To Reproduce
One way to reproduce is to create a helm repository and select two different secrets for auth and custom CA (which is not allowed).
Expected behavior User expects the edit dialog to remain open and display the error message, the same way it is done for a create.
Desktop (please complete the following information): kubeapps version: 12.1.1 / 2.6.1
Additional context I did some debugging as part of fixing other issues, but i am not experienced enough with REACT and could not figure out the difference between the create/edit path. In both cases, the "install" method in "PkgRepoForm" is called up to the "onSubmit" call which return false in both cases. I looked at the reducer and it is called in both cases, with either a "create" or "update" error, but the form is not refreshed for the update case while it is refreshed for the create case