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
  • Loading branch information
swallez committed Aug 5, 2024
1 parent 1b972de commit d525ea8
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 d525ea8

Please sign in to comment.