Browse Source

Correct error output of getCategoryFeeds

rpm
J. King 3 years ago
parent
commit
cca4b205e4
  1. 2
      lib/REST/Miniflux/V1.php
  2. 2
      tests/cases/REST/Miniflux/TestV1.php

2
lib/REST/Miniflux/V1.php

@ -689,7 +689,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
$subs = Arsse::$db->subscriptionList(Arsse::$user->id, $folder, $recursive)->getAll();
} catch (ExceptionInput $e) {
// the folder does not exist
return new EmptyResponse(404);
return new ErrorResponse("404", 404);
}
// compile the list of folders; the feed list includes folder names
// NOTE: We compile the full list of folders in case someone has manually selected a non-top folder

2
tests/cases/REST/Miniflux/TestV1.php

@ -575,7 +575,7 @@ class TestV1 extends \JKingWeb\Arsse\Test\AbstractTest {
public function testListFeedsOfAMissingCategory(): void {
\Phake::when(Arsse::$db)->subscriptionList->thenThrow(new ExceptionInput("idMissing"));
$exp = new EmptyResponse(404);
$exp = new ErrorResponse("404", 404);
$this->assertMessage($exp, $this->req("GET", "/categories/2112/feeds"));
\Phake::verify(Arsse::$db)->subscriptionList(Arsse::$user->id, 2111, true);
}

Loading…
Cancel
Save