1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Build exceptions correctly in Miniflux for clarity

This commit is contained in:
J. King 2022-04-29 19:10:11 -04:00
parent 300225439c
commit f51acb4264

View file

@ -690,7 +690,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
if ($folder === 0) { if ($folder === 0) {
// folder 0 doesn't actually exist in the database, so its name is kept as user metadata // folder 0 doesn't actually exist in the database, so its name is kept as user metadata
if (!strlen(trim($title))) { if (!strlen(trim($title))) {
throw new ExceptionInput("whitespace"); throw new ExceptionInput("whitespace", ['field' => "title", 'action' => __FUNCTION__]);
} }
$title = Arsse::$user->propertiesSet(Arsse::$user->id, ['root_folder_name' => $title])['root_folder_name']; $title = Arsse::$user->propertiesSet(Arsse::$user->id, ['root_folder_name' => $title])['root_folder_name'];
} else { } else {
@ -1024,7 +1024,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
// find the entry we want // find the entry we want
$entry = Arsse::$db->articleList(Arsse::$user->id, $c, self::ARTICLE_COLUMNS)->getRow(); $entry = Arsse::$db->articleList(Arsse::$user->id, $c, self::ARTICLE_COLUMNS)->getRow();
if (!$entry) { if (!$entry) {
throw new ExceptionInput("idMissing"); throw new ExceptionInput("idMissing", ['id' => $id, 'field' => 'entry']);
} }
$out = $this->transformEntry($entry, $meta['num'], $meta['tz']); $out = $this->transformEntry($entry, $meta['num'], $meta['tz']);
// next transform the parent feed of the entry // next transform the parent feed of the entry