Skip Menu |

This queue is for tickets about the OAuth-Lite CPAN distribution.

Report information
The Basics
Id: 71265
Status: new
Priority: 0/
Queue: OAuth-Lite

People
Owner: Nobody in particular
Requestors: 10koba01 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.31
Fixed in: (no value)



Subject: More detail error message
Hello. I try using OAuth::Lite::Consumer for the OAuth authentication of Yahoo! Japan, and need a more detailed error message than a status-line such as "401 Forbidden". Could you modify to put out a more detailed error message? I sent a patch. Thank you.
Subject: Consumer.pm.patch
--- OAuth/Lite/Consumer.pm 2011-07-20 14:40:23.000000000 +0900 +++ OAuth/Lite/Consumer.pm.new 2011-09-27 12:01:46.000000000 +0900 @@ -389,7 +389,7 @@ my $self = shift; my $res = $self->_get_request_token(@_); unless ($res->is_success) { - return $self->error($res->status_line); + return $self->error($res->status_line . ': ' . $res->content); } my $resp = OAuth::Lite::Response->from_encoded($res->decoded_content||$res->content); return $self->error(qq/oauth_callback_confirmed is not true/) @@ -436,7 +436,7 @@ my $self = shift; my $res = $self->_get_request_token(@_); unless ($res->is_success) { - return $self->error($res->status_line); + return $self->error($res->status_line . ': ' . $res->content); } my $token = OAuth::Lite::Token->from_encoded($res->decoded_content||$res->content); return $self->error(qq/oauth_callback_confirmed is not true/) @@ -524,7 +524,7 @@ params => $params, ); unless ($res->is_success) { - return $self->error($res->status_line); + return $self->error($res->status_line . ': ' . $res->content); } my $resp = OAuth::Lite::Response->from_encoded($res->decoded_content||$res->content); $self->access_token($resp->token); @@ -589,7 +589,7 @@ params => { oauth_verifier => $verifier }, ); unless ($res->is_success) { - return $self->error($res->status_line); + return $self->error($res->status_line . ': ' . $res->content); } my $access_token = OAuth::Lite::Token->from_encoded($res->decoded_content||$res->content); $self->access_token($access_token);