]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1287895 - fetching Github pull requests should have better logging to help with...
authorDavid Lawrence <dkl@mozilla.com>
Tue, 9 Aug 2016 17:14:18 +0000 (17:14 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Tue, 9 Aug 2016 17:14:18 +0000 (17:14 +0000)
extensions/BMO/Extension.pm

index ca47017483854d941303cbc453ea35a3f329dcf4..5b87d2e8b9c46a39561eb1e9f23949529103dfa5 100644 (file)
@@ -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;
 }