List of usage examples for org.springframework.web.client UnknownHttpStatusCodeException UnknownHttpStatusCodeException
public UnknownHttpStatusCodeException(int rawStatusCode, String statusText, @Nullable HttpHeaders responseHeaders, @Nullable byte[] responseBody, @Nullable Charset responseCharset)
From source file:com.neiljbrown.brighttalk.channels.reportingapi.client.spring.ApiResponseErrorHandler.java
private HttpStatus getHttpStatusCode(ClientHttpResponse response) throws IOException { HttpStatus statusCode;/*from w w w. jav a 2s . c o m*/ try { statusCode = response.getStatusCode(); } catch (IllegalArgumentException ex) { throw new UnknownHttpStatusCodeException(response.getRawStatusCode(), response.getStatusText(), response.getHeaders(), getResponseBody(response), getCharset(response)); } return statusCode; }