diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-02-05 15:18:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 15:18:44 +0100 |
commit | 1e5d0f436dbb089ddc666938fe7f82b5374cad76 (patch) | |
tree | 0c118d52e38df73ef68f1797869a1895478ecb8f /vespaclient-core | |
parent | 9ed2f7678b9fe349ed84a263bb2e21f0b4aa3092 (diff) |
Revert "Balder/again when time is up it is up"
Diffstat (limited to 'vespaclient-core')
-rwxr-xr-x | vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java b/vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java index 3b84f83fafa..635659204e8 100755 --- a/vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java +++ b/vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java @@ -172,22 +172,14 @@ public final class FeedResponse extends HttpResponse implements SharedSender.Res // Like busy, no space etc. if (error == DocumentProtocol.ERROR_NO_SPACE) { return com.yahoo.container.protect.Error.INSUFFICIENT_STORAGE; - } else if (isTransientError(error)) { + } else if (error >= ErrorCode.TRANSIENT_ERROR && (error < ErrorCode.FATAL_ERROR)) { return com.yahoo.container.protect.Error.INTERNAL_SERVER_ERROR; - } if (isFatalError(error)) { + } if (error >= ErrorCode.FATAL_ERROR && (error < ErrorCode.ERROR_LIMIT)) { return com.yahoo.container.protect.Error.INTERNAL_SERVER_ERROR; } return com.yahoo.container.protect.Error.INTERNAL_SERVER_ERROR; } - private static boolean isFatalError(int error) { - return (error >= ErrorCode.FATAL_ERROR) && (error < ErrorCode.ERROR_LIMIT); - } - - private static boolean isTransientError(int error) { - return (error >= ErrorCode.TRANSIENT_ERROR) && (error < ErrorCode.FATAL_ERROR); - } - public boolean isSuccess() { return errors.isEmpty(); } |