Empty response check
This commit is contained in:
parent
d70fe5c9db
commit
87703c97c5
|
@ -116,6 +116,8 @@ public class OAIClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log.trace("Calling {} ",target.getUri());
|
||||||
|
|
||||||
Response resp=target.request("application/xml").get();
|
Response resp=target.request("application/xml").get();
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,7 +129,9 @@ public class OAIClient {
|
||||||
//No errors, thus reset attempt counter
|
//No errors, thus reset attempt counter
|
||||||
currentAttempt=1;
|
currentAttempt=1;
|
||||||
|
|
||||||
|
if(msg.getResponseRecords().getRecords()!=null)
|
||||||
toReturn.addAll(msg.getResponseRecords().getRecords());
|
toReturn.addAll(msg.getResponseRecords().getRecords());
|
||||||
|
else log.info("NB {} didn't returned any record",msg.getRequest().getPath());
|
||||||
log.debug("Parsed "+toReturn.size()+" records so far.");
|
log.debug("Parsed "+toReturn.size()+" records so far.");
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,7 +148,7 @@ public class OAIClient {
|
||||||
isComplete=true;
|
isComplete=true;
|
||||||
}
|
}
|
||||||
}catch(Throwable t) {
|
}catch(Throwable t) {
|
||||||
log.warn("Unexpected ERROR "+t.getMessage());
|
log.warn("Unexpected ERROR ",t);
|
||||||
log.debug("Current attempt number = "+currentAttempt," max attempt Number = "+MAX_ATTEMPTS+", attempts delay factor = ");
|
log.debug("Current attempt number = "+currentAttempt," max attempt Number = "+MAX_ATTEMPTS+", attempts delay factor = ");
|
||||||
isComplete=currentAttempt>MAX_ATTEMPTS;
|
isComplete=currentAttempt>MAX_ATTEMPTS;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue