protected function checkResponseErrors(Response $response)
	{
		$code = $response->getCode();
		if ($code === 429 && !$response->hasHeader('Retry-After')) {
			throw Response\UnderlyingServiceRateLimitReached::withResponse(
				"Did not receive 'X-Rate-Limit-Type' and 'Retry-After' headers. ".
				"See https://developer.riotgames.com/docs/rate-limiting for more details",
				$response
			);
		}
		if (intval($code / 100) != 2)
		{
			// we have an error!
			$message = "Http Error.";
			if (isset($this->responseErrors[$code]))
			{
				$message = trim($this->responseErrors[$code]);
			}

			$class = 'LeagueWrap\Response\Http'.$code;

			if (class_exists($class) && is_subclass_of($class, ResponseException::class)) {
				throw $class::withResponse($message, $response);
			}
		}
	}