Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Produce better error messages
  • Loading branch information
moritz committed Sep 30, 2014
1 parent 0d08cbd commit c81a4c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/lib/P6Project/Hosts/Github.pm
Expand Up @@ -48,7 +48,7 @@ sub get_api {
my $tx = $self->p6p->ua->get($url, {Authorization => "token $github_token"});
if (! $tx->success ) {
my $error = $tx->error;
$self->p6p->stats->error("Error for project $project->{name} : could not get $url: $error");
$self->p6p->stats->error("Error for project $project->{name} : could not get $url: $error->{code} $error->{message}");
return;
}
return $tx->res->json;
Expand Down Expand Up @@ -77,7 +77,7 @@ sub set_project_info {
my $tx = $ua->get($url);
if (! $tx->success ) {
my $error = $tx->error;
$stats->error("Error for project $project->{name} : could not get $url: $error (project probably dead)");
$stats->error("Error for project $project->{name} : could not get $url: $error->{code} $error->{message} (project probably dead)");
return 0;
}
$project->{url} = $url;
Expand Down

0 comments on commit c81a4c7

Please sign in to comment.