That's because of the StandardError inheritance. I'll refactor the InvalidParameters and then I'll get 422.