We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d2b092 commit 1a483bdCopy full SHA for 1a483bd
web/src/main/webapp/js/ghrequest.js
@@ -535,7 +535,10 @@ GHRequest.prototype.doRequest = function (url, callback) {
535
// problematic: this callback is not invoked when using JSONP!
536
// http://stackoverflow.com/questions/19035557/jsonp-request-error-handling
537
var msg = "API did not respond! ";
538
- if (err && err.statusText && err.statusText !== "OK")
+ if (err && err.responseText && err.responseText.indexOf('{') >= 0) {
539
+ var jsonError = JSON.parse(err.responseText);
540
+ msg += jsonError.message;
541
+ } else if (err && err.statusText && err.statusText !== "OK")
542
msg += err.statusText;
543
544
log(msg + " " + JSON.stringify(err));
0 commit comments