private function checkException($response)
    {
        if ((true === $this->getThrowExceptions()) and ($this->isErroneousResponse($response))) {
            throw new ClientException($response->detail, $response->status);
        }
        return $response;
    }