GitLab-API-v4 icon indicating copy to clipboard operation
GitLab-API-v4 copied to clipboard

Readable error messages in responses

Open mbuc82 opened this issue 1 year ago • 0 comments

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!

mbuc82 avatar Dec 08 '23 14:12 mbuc82