Send 404 if a note cannot be found
[grauphel.git] / controller / guicontroller.php
index b09ef4a2baf9c3fdf45b164653acb935b9ba94b8..8ebea8c58f5b8900e4dfeb7a14cc97ed1e079f13 100644 (file)
@@ -96,7 +96,9 @@ class GuiController extends Controller
 
         $note = $this->getNotes()->load($guid, false);
         if ($note === null) {
-            return new ErrorResponse('Note does not exist');
+            $res = new ErrorResponse('Note does not exist');
+            $res->setStatus(\OCP\AppFramework\Http::STATUS_NOT_FOUND);
+            return $res;
         }
 
         $converter = new \OCA\Grauphel\Converter\Html();