private Response blockingRequest()

in src/main/java/com/spotify/heroic/client/HeroicClient.java [131:148]


  private Response blockingRequest(Request request) throws HeroicServerException {
    final Response response;
    try {
      response = client.newCall(request).execute();
    } catch (IOException e) {
      throw new HeroicServerException(e.getMessage());
    }

    if (!response.isSuccessful()) {
      try {
        throw new HeroicServerException(
            "status code: " + response.code() + " error: " + response.body().string());
      } catch (IOException e) {
        throw new HeroicServerException(e);
      }
    }
    return response;
  }