Skip to content

Commit

Permalink
Refine BooleanEndpoint so that 4xx status codes other than 404 are co…
Browse files Browse the repository at this point in the history
…nsidered as errors (#853)
  • Loading branch information
swallez authored Aug 6, 2024
1 parent 1b972de commit f28bcd5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public BooleanEndpoint(

@Override
public boolean isError(int statusCode) {
return statusCode >= 500;
// 404 indicates a 'false' result.
return statusCode != 404 && super.isError(statusCode);
}

public boolean getResult(int statusCode) {
Expand Down

0 comments on commit f28bcd5

Please sign in to comment.