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 committed Aug 6, 2024
1 parent 0076f03 commit 6b3030d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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 6b3030d

Please sign in to comment.