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

[1.24] Update RestlibException error reporting #3286

Merged
merged 2 commits into from Jun 14, 2023

Conversation

ptoscano
Copy link
Contributor

Recent PRs in the 1.24 branch (#3261 & #3271) changed how a RestlibException is formatted when exiting with an error; since 1.24 is a long-lived maintenance branch, the expectation is that the error reporting stays unchanged when possible.

Hence, update the error reporting for RestlibException in a couple of places to be back how it used to be before commit 3b3eda2 & commit c4c120a.

The recent changes to RefreshCommand make use of ExceptionMapper in a
place where it was not used previously. While using ExceptionMapper is
generally a good idea to format errors, in this case the consistency
with the behaviour of a maintenance branch is preferred.

Hence, manually print again the message of RestlibException.

Updates commit 3b3eda2.
The newly added get_current_owner() helper uses handle_exception() for
all the exceptions, whereas the expectation for this maintenance branch
is that the message of RestlibException is printed as is.

Hence, add a special handling for RestlibException in
get_current_owner().

Updates commit c4c120a
Copy link
Contributor

@jirihnidek jirihnidek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jirihnidek jirihnidek merged commit 071c73f into subscription-manager-1.24 Jun 14, 2023
2 checks passed
@jirihnidek jirihnidek deleted the ptoscano/error-message-oldstyle branch June 14, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants