fix: return 204 instead of 404

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
This commit is contained in:
SebastianKrupinski 2024-12-12 23:06:01 -05:00
parent 10852d38e3
commit 0628eb62f3
2 changed files with 2 additions and 2 deletions

View file

@ -90,7 +90,7 @@ class ImageExportPlugin extends ServerPlugin {
$response->setBody($file->getContent());
} catch (NotFoundException $e) {
$response->setStatus(404);
$response->setStatus(\OCP\AppFramework\Http::STATUS_NO_CONTENT);
}
return false;

View file

@ -171,7 +171,7 @@ class ImageExportPluginTest extends TestCase {
->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);