replaced a 400 error with 422 (unprocessable entity) on param_rule check failure
refactoring of handling of http errors
Merge pull request #1511 from witlessbird/param_rules_error

Refactoring of http errors (mostly 400 - InvalidRequest), mostly in param_rules checks.