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:
@@ -561,8 +561,6 @@ class Pref_Feeds extends Handler_Protected {
|
||||
"all" => $this::get_ts_languages(),
|
||||
]
|
||||
]);
|
||||
} else {
|
||||
print json_encode(["error" => "FEED_NOT_FOUND"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user