throw new LongRunningQueryException(locationUri, parseRetryAfter(retryAfter), ticket);
}
if (response.getType() != null && !response.getType().isCompatible(MediaType.APPLICATION_JSON_TYPE)) {
throw new SodaError(new SodaErrorResponse(UNEXPECTED_ERROR, body, null, null), status);
}
SodaErrorResponse sodaErrorResponse;
if(body.isEmpty()) {
sodaErrorResponse = new SodaErrorResponse(String.valueOf(status), null, null, null);
} else {
try {
sodaErrorResponse = mapper.readValue(body, SodaErrorResponse.class);
} catch (Exception e) {
throw new SodaError(new SodaErrorResponse(MALFORMED_RESPONSE, body, null, null), status);
}
}
switch (status) {
case 400: