Bug 1566147
Summary: | Untranslated "HTTP error (%s - %s)" or "HTTP error (%s - %s): %s" is prefixed to the STDERR in some cases | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Shwetha Kallesh <skallesh> |
Component: | subscription-manager | Assignee: | candlepin-bugs |
Status: | CLOSED NOTABUG | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 7.5 | CC: | jsefler, khowell, redakkan |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-02-08 15:15:58 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
Shwetha Kallesh
2018-04-11 15:50:30 UTC
This is new behavior as introduced by post subscription-manager commit 630e1a2eb06e6bfacac669ce11f38e228c907ea9 1507030: RestlibExceptions should show they originate server-side Something that we might want to fix.... exceptions.py has a translated message for RESTLIB_MESSAGE = _(u"HTTP error code %s: %s"), but there are other messages from commit 630e1a2eb06e6bfacac669ce11f38e228c907ea9 that are surfacing to the CLI too that are not translated. e.g. "HTTP error (%s - %s): %s" as demonstrated in the stderr from... 201804111700:19.491 - FINE: ssh root.redhat.com subscription-manager repo-override --repo=label --add=param:value_7890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 201804111700:21.158 - FINE: Stdout: 201804111700:21.158 - FINE: Stderr: HTTP error (400 - Bad Request): value: size must be between 0 and 255 Note that there are two strings. "HTTP error (%s - %s)" is in RestlibException. "HTTP error code %s: %s" is assigned to the constant "RESTLIB_MESSAGE" and marked for translation. and is what is meant to be displayed on the console. The __str__ on RestlibException is only meant to appear in logs. There are two solutions here: 1. Mark the string in RestlibException's __str__ as translatable and be done with it. 2. Figure out why the __str__ from RestlibException is bubbling up to the console instead of being displayed using RESTLIB_MESSAGE |