Bug 999509 - Shorten error messages
Summary: Shorten error messages
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: xmlrpc-c
Version: 22
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Igor Gnatenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-21 12:47 UTC by Denys Vlasenko
Modified: 2016-07-19 20:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 20:46:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Denys Vlasenko 2013-08-21 12:47:41 UTC
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 14:59:37 UTC
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 09:43:09 UTC
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 20:46:39 UTC
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.