diff --git a/public/i18n/locale-en.json b/public/i18n/locale-en.json index 074cce2..eba9e48 100644 --- a/public/i18n/locale-en.json +++ b/public/i18n/locale-en.json @@ -1,5 +1,7 @@ { "ERRORS": { + "unknown_error": "Unknown error, contact the admin.", + "unreachable": "Anonymous GitHub is unreachable, contact the admin.", "request_error": "Unable to download the file, check your connection or contact the admin.", "repo_not_found": "The repository is not found.", "repo_not_accessible": "Anonymous GitHub is unable to or is forbidden to access the repository.", diff --git a/public/script/app.js b/public/script/app.js index 3c13ce0..2206e5a 100644 --- a/public/script/app.js +++ b/public/script/app.js @@ -1667,6 +1667,7 @@ angular }, (err) => { $scope.type = "error"; + $scope.content = "unknown_error"; try { err.data = JSON.parse(err.data); if (err.data.error) { @@ -1678,6 +1679,9 @@ angular console.log(err); if (err.status == -1) { $scope.content = "request_error"; + } else if (err.status == 502) { + // cloudflare error + $scope.content = "unreachable"; } } }