From: David Lawrence Date: Tue, 9 Aug 2016 17:14:18 +0000 (+0000) Subject: Bug 1287895 - fetching Github pull requests should have better logging to help with... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c023fdabcb345293b7559102be534432977d29f6;p=thirdparty%2Fbugzilla.git Bug 1287895 - fetching Github pull requests should have better logging to help with debugging errors --- diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index ca4701748..5b87d2e8b 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -1176,8 +1176,12 @@ sub _attachment_fetch_github_pr_diff { $ua->proxy('https', Bugzilla->params->{proxy_url}); } - my $response = $ua->get($self->data . ".diff"); - return "Error retrieving Github pull request diff" if $response->is_error; + my $pr_diff = $self->data . ".diff"; + my $response = $ua->get($pr_diff); + if ($response->is_error) { + warn "Github fetch error: $pr_diff, " . $response->status_line; + return "Error retrieving Github pull request diff for " . $self->data; + } return $response->content; }