yield result code from http error handler

This commit is contained in:
Jonathan Shook 2021-05-13 12:58:27 -05:00
parent 9a7a897018
commit 3809db4b47

View File

@ -77,6 +77,8 @@ public class HttpAction implements SyncAction {
} finally {
}
int resultCode=0;
while (tries < maxTries) {
tries++;
@ -128,6 +130,7 @@ public class HttpAction implements SyncAction {
} else {
// count and log exception types
ErrorDetail detail = httpActivity.getErrorHandler().handleError(error, cycle, nanos);
resultCode=detail.resultCode;
if (!detail.isRetryable()) {
break; // break out of the tries loop without retrying, because the error handler said so
}
@ -139,7 +142,7 @@ public class HttpAction implements SyncAction {
httpActivity.triesHisto.update(tries);
return 0;
return resultCode;
}
private HttpRequest.BodyPublisher bodySourceFrom(Map<String, String> cmdMap) {