@Override public Throwable fromResponse(final Response response) { if (response.getStatusCode() == 403) { SecurityException securityException = null; try { securityException = fromJSON(response, SecurityException.class); } catch (RuntimeException e) { } if (securityException != null) { return securityException; } } return new ResponseException(response.getStatusText(), response); }
@Override public Throwable fromResponse(final Response response) { if (response.getStatusCode() == 403) { SecurityException securityException = null; try { securityException = fromJSON(response, SecurityException.class); } catch (RuntimeException e) { } if (securityException != null) { return securityException; } } return new ResponseException(response.getStatusText(), response); }
if (responseCode >= 300) { connection.disconnect(); throw new ResponseException(responseCode + " " + connection.getResponseMessage(), 0, responseCode);
throwable = new ResponseException(response.getStatusText(), response); throwable = new ResponseException("Response returned with status=" + response.getStatusCode(), response);