1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 10:05:56 +00:00

drop errors.php and simplify error handling

This commit is contained in:
Andrew Dolgov
2021-02-23 22:26:07 +03:00
parent 37d46411c7
commit 8d2e3c2528
19 changed files with 94 additions and 200 deletions

View File

@@ -561,8 +561,6 @@ class Pref_Feeds extends Handler_Protected {
"all" => $this::get_ts_languages(),
]
]);
} else {
print json_encode(["error" => "FEED_NOT_FOUND"]);
}
}

View File

@@ -16,8 +16,6 @@ class Pref_Labels extends Handler_Protected {
if ($line = $sth->fetch(PDO::FETCH_ASSOC)) {
print json_encode($line);
} else {
print json_encode(["error" => "LABEL_NOT_FOUND"]);
}
}

View File

@@ -1063,7 +1063,7 @@ class Pref_Prefs extends Handler_Protected {
}
} else {
header("Content-Type: text/json");
print error_json(6);
print Errors::to_json(Errors::E_UNAUTHORIZED);
}
}

View File

@@ -19,8 +19,6 @@ class Pref_Users extends Handler_Administrative {
"user" => $row,
"access_level_names" => $access_level_names
]);
} else {
print json_encode(["error" => "USER_NOT_FOUND"]);
}
}