+
Skip to content

Readable error messages in responses #58

@mbuc82

Description

@mbuc82

Hello everyone,

apparently the response messages in RESTClient.pm are truncated after 50 characters, in case of any errors.

The related code looks as follows:

my $glimpse = $res->{content} || '';
$glimpse =~ s{\s+}{ }g;
if ( length($glimpse) > 50 ) {
    $glimpse = substr( $glimpse, 0, 50 );
    $glimpse .= '...';
}

Is there a special reason, why it's truncated, as in case of doubt, any message pointing to a problem potentially becomes unreadable.
Would it be possible to make this at least configurable?

Thanks in advance and cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载