'500 Internal Server' error is returned when the MR diff API is invoked with the option `page=0`

Summary

The Diff API gives '500 Internal server error' if the "page=0" option is used. It gives expected results in other API endpoints, such as the project API, though.

Steps to reproduce

Example Project

What is the current bug behavior?

If page=0 value is used, Diff API returns '500 Internal server error'.

What is the expected correct behavior?

As mentioned here , if the default value of page is 1 , then the error message could be more clear.(Something like Page is not valid)

Relevant logs and/or screenshots

curl --header "PRIVATE-TOKEN: xxxxxxxxx" "https://gitlab.com/api/v4/projects/41299325/merge_requests/10/diffs?page=0"

{"message":"500 Internal Server Error"}%

Example MR - gitlab-gold/vid-test/vid-test-security-policy-project!10

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes