mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-20 08:24:43 +02:00
feat: improve response content type header
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"ERRORS": {
|
||||
"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.",
|
||||
"repository_expired": "The repository is expired",
|
||||
|
||||
+10
-5
@@ -1669,11 +1669,16 @@ angular
|
||||
$scope.type = "error";
|
||||
try {
|
||||
err.data = JSON.parse(err.data);
|
||||
} catch (ignore) {}
|
||||
if (err.data.error) {
|
||||
$scope.content = err.data.error;
|
||||
} else {
|
||||
$scope.content = err.data;
|
||||
if (err.data.error) {
|
||||
$scope.content = err.data.error;
|
||||
} else {
|
||||
$scope.content = err.data;
|
||||
}
|
||||
} catch (ignore) {
|
||||
console.log(err);
|
||||
if (err.status == -1) {
|
||||
$scope.content = "request_error";
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user