/** * @param string $url * @param bool $acceptJsonResponse * * @return ResponseInterface * @throws ItemDoesNotExistsException * @throws UnsatisfactoryResponseCodeException * @throws RequestException */ protected function apiGet($url, $acceptJsonResponse = true) { $response = parent::apiGet($url, $acceptJsonResponse); if ($response->getStatusCode() === 404) { throw new ItemDoesNotExistsException(); } elseif ($response->getStatusCode() !== 200) { throw new UnsatisfactoryResponseCodeException(); } return $response; }