Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.15.z] Abstract adding json respone to error message #1236

Merged

Conversation

Satellite-QE
Copy link
Contributor

Cherrypick of PR: #1224

Description of changes

The output of raise_for_status is not really descriptive for since the actual error message is not part of the exception.

This commit exapnds on 95b3ce1

Adds existing solution to all raise_for_status calls.

Functional demonstration

Example:

requests.exceptions.HTTPError: ('500 Server Error: Internal Server Error for url: https://robo-main-orcharhino-alma8.infra.dev.atix/katello/api/v2/repositories/42', {'displayMessage': 'Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to delete it or use --remove-from-content-view-versions flag to automatically remove the repository from all published versions.', 'errors': ['Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to delete it or use --remove-from-content-view-versions flag to automatically remove the repository from all published versions.']})

vs.

requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://robo-main-orcharhino-alma8.infra.dev.atix/katello/api/v2/repositories/24

The output of raise_for_status is not really descriptive
for since the actual error message is not part of the
exception.

This commit exapnds on 95b3ce1

Adds existing solution to all raise_for_status calls.

(cherry picked from commit 08bbd9a)
@Satellite-QE Satellite-QE added 6.15.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches labels Oct 10, 2024
@ogajduse ogajduse merged commit 6ffa48b into 6.15.z Oct 22, 2024
19 checks passed
@ogajduse ogajduse deleted the cherry-pick-6.15.z-08bbd9a113c9fee7905eb508eae0c73c471a8074 branch October 22, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants