Add validation to maximum limit value

(cherry picked from commit 4ed757f)
revert-70aa11f8
charitha 8 years ago
parent 33cc38defb
commit 0498c68ca5

@ -337,10 +337,10 @@ public class RequestValidationUtil {
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request parameter limit is a " +
"negative value.").build());
}
if (limit - offset > 100) {
if (limit > 100) {
throw new InputValidationException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request results list should" +
" be less than or equal 100 values.").build());
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request parameter limit should" +
" be less than or equal to 100.").build());
}
}

Loading…
Cancel
Save