Bug 999509 - Shorten error messages
Shorten error messages
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: xmlrpc-c (Show other bugs)
22
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: Igor Gnatenko
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-21 08:47 EDT by Denys Vlasenko
Modified: 2016-07-19 16:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-19 16:46:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Denys Vlasenko 2013-08-21 08:47:41 EDT
Error message on extra long server response is:

"Unable to make sense of XML-RPC response from server.  XML-RPC response too large.  Our limit is 1048576 characters.  We got 1048780 characters.  Use XMLRPC_TRACE_XML to see for yourself"

That is 187 characters. Which causes mini-disasters such as in bug 961520,
https://bugzilla.redhat.com/attachment.cgi?id=746472
where user missed crucial information (how big the response in fact was)
because message is so talkative it scrolled off tot the right.

This message comes from xmlrpc_client.c:

    if (respEnv.fault_occurred)
        xmlrpc_env_set_fault_formatted(
            envP, respEnv.fault_code,
            "Unable to make sense of XML-RPC response from server.  "
            "%s.  Use XMLRPC_TRACE_XML to see for yourself",
            respEnv.fault_string);

and xmlrpc_parse.c:

    if (xmlDataLen > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID))
        xmlrpc_env_set_fault_formatted(
            envP, XMLRPC_LIMIT_EXCEEDED_ERROR,
            "XML-RPC response too large.  Our limit is %u characters.  "
            "We got %u characters",
            (unsigned)xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID),
            (unsigned)xmlDataLen);

I propose these messages to be shortened. In my own practice I found that it is usually possible to make messages terse, yet informative. "characters" -> "bytes". "Unable to" -> "Can't". Sacrifice double spaces after periods. Etc.

For a concrete proposal, how about this? -

    if (respEnv.fault_occurred)
        xmlrpc_env_set_fault_formatted(
            envP, respEnv.fault_code,
            "Can't make sense of XML-RPC response from server. "
            "%s.  Use XMLRPC_TRACE_XML to see for yourself",
            respEnv.fault_string);
...
    if (xmlDataLen > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID))
        xmlrpc_env_set_fault_formatted(
            envP, XMLRPC_LIMIT_EXCEEDED_ERROR,
            "Response too large: %u bytes > %u",
            (unsigned)xmlDataLen,
            (unsigned)xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID));

This would result in 136 chars:

"Can't make sense of XML-RPC response from server. Response too large: 1048780 bytes > 1048576. Use XMLRPC_TRACE_XML to see for yourself"

Further reduction may be "Can't make sense" => "Can't parse". Same meaning. 128 bytes.
Comment 1 Jaroslav Reznik 2015-03-03 09:59:37 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Comment 2 Fedora Admin XMLRPC Client 2016-06-13 05:43:09 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Fedora End Of Life 2016-07-19 16:46:39 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.