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) (#854)

Co-authored-by: Sylvain Wallez <[email protected]>
  • Loading branch information
github-actions[bot] and swallez authored Aug 6, 2024
1 parent 184174a commit 6d3ab19
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 6d3ab19

Please sign in to comment.