]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/bookmark/BookmarkFileService.php
Raise 404 error instead of 500 if permalink access is denied
[github/shaarli/Shaarli.git] / application / bookmark / BookmarkFileService.php
index 0df2f47f7e6d3fb4aad5ebbfa8d16253a59089a3..3ea98a45d6bf24c1ce501826d7dc84455bdae5ee 100644 (file)
@@ -106,7 +106,7 @@ class BookmarkFileService implements BookmarkServiceInterface
             && $first->isPrivate()
             && (empty($privateKey) || $privateKey !== $first->getAdditionalContentEntry('private_key'))
         ) {
-            throw new Exception('Not authorized');
+            throw new BookmarkNotFoundException();
         }
 
         return $first;