feat: improve error management in front end

This commit is contained in:
tdurieux
2023-04-26 00:27:52 +02:00
parent 083026f168
commit 3bf6864472
2 changed files with 6 additions and 0 deletions

View File

@@ -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";
}
}
}