Skip to content

Commit

Permalink
fix: return 204 instead of 404
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
  • Loading branch information
SebastianKrupinski committed Dec 13, 2024
1 parent 10852d3 commit 0628eb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/dav/lib/CardDAV/ImageExportPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function httpGet(RequestInterface $request, ResponseInterface $response)

$response->setBody($file->getContent());
} catch (NotFoundException $e) {
$response->setStatus(404);
$response->setStatus(\OCP\AppFramework\Http::STATUS_NO_CONTENT);
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function testCard($size, $photo): void {
->willThrowException(new NotFoundException());
$this->response->expects($this->once())
->method('setStatus')
->with(404);
->with(\OCP\AppFramework\Http::STATUS_NO_CONTENT);
}

$result = $this->plugin->httpGet($this->request, $this->response);
Expand Down

0 comments on commit 0628eb6

Please sign in to comment.