Reputation: 271694
Let's say the person passed in "5", when the parameter must be 0 or 1.
Upvotes: 0
Views: 66
Reputation: 116502
I would actually suggest 400 (Bad Request) which is typically used for cases like this. More information is usually returned as payload (to indicate which parameter was at fault, with possible acceptable value range etc).
Upvotes: 3