X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FEntryRestController.php;h=2c2ec0c106ac1d72073649907f45a634ff7ad2ba;hb=1093e979ff49f9072c30d1d576c6adf1f8e76bdf;hp=1a726b6edbcc776aa0ba2cb0f57ea862574732f1;hpb=ba838dae5ac5bf0a65165ee075138aefbccbc3a2;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 1a726b6e..2c2ec0c1 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php @@ -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();