foreman
foreman copied to clipboard
Fixes #37222 - Show error message if host fails to save
At present, Error is shown only if host fails to save due to errors caught in foreman or it shows inline errors. But there are cases where host fails to save due to wrong selection of Lifecycle environment or content view where it silently fails to save the host and only show error in production log.
For example, if you specify the wrong lifecycle environment and deploy via foreman_proxy "Content view environment content facets is invalid" appears in production.log but nothing is displayed in GUI and it simply didn't save the host. These error come from different plugins (e.g., here error was from Katello ) and are not stored in base errors
therefore, are not displayed.
The error shown there might not make sense to users -- would it make sense to pick some errors that you encounter frequently, catch them, and return a warning with some instructions about how to fix the problem? "Content view environment content facets" is a bit of an internal thing.
The error shown there might not make sense to users -- would it make sense to pick some errors that you encounter frequently, catch them, and return a warning with some instructions about how to fix the problem? "Content view environment content facets" is a bit of an internal thing.
I tried using :messge
in Katello content_facet model as well but there I would have to provide the error message which is general enough for all errors. The error I encountered was due to selection of wrong lifecycle environment and there is possibility that the above error is thrown for other cases.
I agree that the error message is not very intuitive but that's the only error message which was caught in the host error messages.
Yeah, a second PR to improve the Katello error I think would round this out nicely.