/**
  * @throws 403
  * @throws 404
  */
 private function getAttachedFileContent($id, $offset, $limit)
 {
     try {
         return $this->file_manager->getAttachedFileChunk($id, $this->user, $offset, $limit);
     } catch (PermissionDeniedOnFieldException $e) {
         throw new RestException(403);
     } catch (FileNotFoundException $e) {
         throw new RestException(404);
     }
 }