diff --git a/controllers/user.js b/controllers/user.js index b87d05b9b..161f9dae8 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -1682,13 +1682,17 @@ exports.userGitHubImportScriptPage = function (aReq, aRes, aNext) { }, ], function (aErr) { var script = null; + var code = null; if (aErr) { - console.error([ - aErr, - authedUser.name + ' ' + githubUserId + ' ' + githubRepoName + ' ' + githubBlobPath + code = (aErr instanceof statusError ? aErr.status.code : aErr.code); + if (code && !isNaN(code) && code >= 500) { + console.error([ + aErr, + authedUser.name + ' ' + githubUserId + ' ' + githubRepoName + ' ' + githubBlobPath - ].join('\n')); + ].join('\n')); + } if (!(aErr instanceof String)) { statusCodePage(aReq, aRes, aNext, { @@ -1707,7 +1711,7 @@ exports.userGitHubImportScriptPage = function (aReq, aRes, aNext) { }); } else { statusCodePage(aReq, aRes, aNext, { - statusCode: 500, // NOTE: Watchpoint + statusCode: 500, statusMessage: aErr }); } diff --git a/views/pages/statusCodePage.html b/views/pages/statusCodePage.html index 093b3cada..826de0c17 100644 --- a/views/pages/statusCodePage.html +++ b/views/pages/statusCodePage.html @@ -45,7 +45,7 @@

{{statusCode}}

Session Length: {{length}} {{/isAdminSessionLengthView}} {{#isGHImport}} - {{{statusMessage}}}
{{utf_pathname}}{{utf_pathext}} + {{{statusMessage}}}
{{utf_pathname}}{{utf_pathext}} {{/isGHImport}} {{#isListView}} {{{statusMessage}}}
Please retry {{#retryAfter}}after approximately {{retryAfter}} seconds{{/retryAfter}}{{^retryAfter}}later{{/retryAfter}}.