I noticed 2 different bugs on staging reloated to error snackbars.
1: No snackbar is displayed when the API returns a 400 (maybe we forgot to call enqueueSnackbar at some places ?)
Reproduction: go to staging on Resah - Mimic (here) and try to access "Database credentials", check the network: you will see that there is a 400 when trying to fetch credentials but no snackbar is displayed.
2: The snackbar displayed is empty.
Reproduction: on the same source, access the database credentials (there are missing but nevermind). Try to create a new one (fill all the fields and submit) you will see that there is a 400 error in the network (with an error message in the response) but the error message does not appear in the snackbar.
Description
I noticed 2 different bugs on staging reloated to error snackbars.
1: No snackbar is displayed when the API returns a 400 (maybe we forgot to call
enqueueSnackbar
at some places ?) Reproduction: go to staging onResah - Mimic
(here) and try to access "Database credentials", check the network: you will see that there is a 400 when trying to fetch credentials but no snackbar is displayed.2: The snackbar displayed is empty. Reproduction: on the same source, access the database credentials (there are missing but nevermind). Try to create a new one (fill all the fields and submit) you will see that there is a 400 error in the network (with an error message in the response) but the error message does not appear in the snackbar.
Resolution