Open
Description
For example: Currently the impl throws a generic RuntimeException for IO errors.
try {
return Response.create(response.getRequest(), response.getStatusCode(), response.getHeaders(), response.getValue().toObject(AudioTranscription.class));
} catch (IOException e) {
throw new RuntimeException(e);
}
Could be improved to for eg:
try {
T value = response.getValue().toObject(targetType);
return Response.create(response.getRequest(), response.getStatusCode(), response.getHeaders(), value);
} catch (IOException e) {
throw LOGGER.logThrowableAsError(new IllegalStateException("Failed to deserialize response", e));
}