Browse Source

Build exceptions correctly in Miniflux for clarity

reader
J. King 2 years ago
parent
commit
f51acb4264
  1. 4
      lib/REST/Miniflux/V1.php

4
lib/REST/Miniflux/V1.php

@ -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

Loading…
Cancel
Save