Bug 1976240
Summary: | [RFE] improve HTTP code/message reporting in error strings | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Pino Toscano <ptoscano> |
Component: | subscription-manager | Assignee: | mhorky |
Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 9.0 | CC: | jsefler, mhorky, redakkan, zpetrace |
Target Milestone: | beta | Keywords: | FutureFeature, Triaged |
Target Release: | 9.0 Beta | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | subscription-manager-1.29.21-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-17 15:58:13 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Pino Toscano
2021-06-25 15:27:57 UTC
I like the proposal with a small change to the format. Let's complete the message with a period before appending the suffix as shown in this example, and let's make use of the already existing translations for string src/subscription_manager/exceptions.py:RESTLIB_MESSAGE = _(u"HTTP error code %s: %s") # subscription-manager attach --quantity=2 --pool=8a99f9ac75743133017575f553fc0093 Multi-entitlement not supported for pool with ID "8a99f9ac75743133017575f553fc0093". (HTTP error code 403: Forbidden) [root@kvm-08-guest11 ~]# rpm -q subscription-manager --changelog | grep 1976240 - 1976240: Improve HTTP code/message reporting in error strings [root@kvm-08-guest11 ~]# subscription-manager version Version: server type: Red Hat Subscription Management subscription management server: 3.2.21-1 subscription management rules: 5.41 subscription-manager: 1.29.19-1.git.119.033bf98.el9 Registering: [root@kvm-08-guest11 ~]# subscription-manager register Registering to: subscription.rhsm.stage.redhat.com:443/subscription Username: zpetracePH03 Password: The system has been registered with ID: dec1b13c-eacf-4f6e-8878-f3f2819dc2f8 The registered system name is: kvm-08-guest11.hv2.lab.eng.bos.redhat.com Available pools: [root@kvm-08-guest11 ~]# subscription-manager list --avail --pool-only 8a99f9ac7b5ee892017bc59cbab16930 8a99f9ac7b5ee892017bc59f5c236932 8a99f9ad7bca8239017bdf952e2e051d 8a99f9ad7bca8239017bdf952e77051f 8a99f9ad7bca8239017bdf954e010521 Pre-verification 1: [root@kvm-08-guest11 ~]# subscription-manager attach --quantity=2 --pool=8a99f9ac7b5ee892017bc59cbab16930 --pool=8a99f9ac7b5ee892017bc59f5c236932 Multi-entitlement not supported for pool with ID "8a99f9ac7b5ee892017bc59f5c236932". (HTTP error code 403: Forbidden) ^^ message fits the suggested comment --> PASSED Pre-verification 2: [root@kvm-08-guest11 ~]# subscription-manager attach --quantity=3 --pool=8a99f9ac7b5ee892017bc59f5c236932 Multi-entitlement not supported for pool with ID "8a99f9ac7b5ee892017bc59f5c236932". (HTTP error code 403: Forbidden) ^^ message fits the suggested comment --> PASSED Verifying on : ============= # rpm -q subscription-manager --changelog | grep 1976240 - 1976240: Improve HTTP code/message reporting in error strings # subscription-manager version server type: Red Hat Subscription Management subscription management server: 3.2.21-1 subscription management rules: 5.41 subscription-manager: 1.29.21-1.el9 # subscription-manager list --avail --pool-only 8a99f9ac7d4946d5017d567aee5c0437 8a99f9ac7d4946d5017d56fb218e0480 8a99f9af7d4d1194017d5676eeba04cf # subscription-manager attach --pool 8a99f9ac7d4946d5017d567aee5c0437 --quantity=2 Multi-entitlement not supported for pool with ID "8a99f9ac7d4946d5017d567aee5c0437". (HTTP error code 403: Forbidden) ^^ notice the error codes were move to the end of message . Verifying the bug Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: subscription-manager), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:3984 |