]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/EntryRestController.php
Merge pull request #2879 from matteocoder/matteocoder-patch-1
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / EntryRestController.php
index 1a726b6edbcc776aa0ba2cb0f57ea862574732f1..2c2ec0c106ac1d72073649907f45a634ff7ad2ba 100644 (file)
@@ -287,7 +287,7 @@ class EntryRestController extends WallabagRestController
 
     /**
      * Reload an entry.
-     * A response with HTTP Status 400 will be return if we weren't able to update the content (because it hasn't changed or we got an error).
+     * An empty response with HTTP Status 304 will be send if we weren't able to update the content (because it hasn't changed or we got an error).
      *
      * @ApiDoc(
      *      requirements={
@@ -310,12 +310,12 @@ class EntryRestController extends WallabagRestController
                 'entry' => $entry,
             ]);
 
-            return new JsonResponse(['error' => 'Error while trying to fetch content'], 400);
+            return new JsonResponse([], 304);
         }
 
         // if refreshing entry failed, don't save it
         if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) {
-            return new JsonResponse(['error' => 'Error while trying to extract content'], 400);
+            return new JsonResponse([], 304);
         }
 
         $em = $this->getDoctrine()->getManager();