Repository navigation
Conversation
When the Foreman/Katello API returns validation errors (422 status),
it includes detailed error messages in the 'displayMessage' field.
The exception handler was only checking 'message' and 'full_messages',
causing detailed error information to be lost.
This commit updates handle_unprocessable_entity to check for
'displayMessage' first, matching the behavior of handle_foreman_error
which already handles this field correctly.
Before:
Could not update the host
After:
Could not update the host:
Validation failed: Host example.com: Cannot add content view
environment to content facet. The host's content source does
not sync lifecycle environment 'Library'.
(cherry picked from commit 4aab7ea)
chris1984
approved these changes
Oct 21, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports the displayMessage handling change from upstream PR #655. When a 422 response includes displayMessage, preserve the detailed validation error in the CLI output.