Let's say the pers开发者_Go百科on passed in "5", when the parameter must be 0 or 1.
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).
精彩评论