protected function handle(ResponseInterface $response)
    {
        $httpException = new HttpException($response->getStatusCode(), $response->getReasonPhrase());
        $error = json_decode((string) $response->getBody());

        throw new ApiException($error->message, $httpException, $error->code);
    }
protected function handle(ResponseInterface $response)
    {
        $httpException = new HttpException($response->getStatusCode(), $response->getReasonPhrase());
        $error = json_decode((string) $response->getBody());

        throw new ApiException($error->message, $httpException, $error->code);
    }
{@inheritdoc}

"You can consider any non-200 HTTP response code an error - the returned data will contain more detailed information"