Only log error if required
@@ -350,11 +350,12 @@ public class JerseyRestClient {
} catch (Exception e) {
if (e instanceof NotAcceptableException) {
obj = handleNotAcceptableGetRequestJsonException(target, clazz);
- }
+ } else {
if (logError) {
log.error("Failed to process request " + path, e);
}
}
+ }
return obj;
}
