private function processHttpResponse($response)
    {
        $statusCode = $response->getStatusCode();
        switch ($statusCode) {
            case 200: break;
            case 404: break;
            case 400: throw new Exception\ClientRequestException("The server rejected our request. Are you using a deprecated version of the BitRank PHP client?");
            case 401: throw new Exception\AuthException("The server reject our API key.");
            case 403:
                $data = json_decode($response->getBody(), true);
                if (isset($data['errorCode']) && $data['errorCode'] === 'API_LIMIT_EXCEEDED') {
                    throw new Exception\RequestLimitExceededException();
                } else {
                    $message = '';
                    if (isset($data['message'])) {
                        $message = $data['message'];
                    }
                    throw new Exception\AuthException("The server rejected our API key: " . $message);
                }
            case 429: throw new Exception\RateLimitExceededException();
            case 500: throw new Exception\ServerErrorException("The server reported that an internal error occured during the processing of this request.");
        }

        return $statusCode;
    }