foreman icon indicating copy to clipboard operation
foreman copied to clipboard

Fixes #37222 - Show error message if host fails to save

Open Manisha15 opened this issue 4 months ago • 3 comments

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.

Screenshot from 2024-03-13 12-51-47

Manisha15 avatar Mar 05 '24 07:03 Manisha15

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.

ianballou avatar Mar 21 '24 14:03 ianballou

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.

Manisha15 avatar Mar 22 '24 07:03 Manisha15

Yeah, a second PR to improve the Katello error I think would round this out nicely.

ianballou avatar Mar 26 '24 13:03 ianballou