ActionController::InvalidCrossOriginRequest fails with 422 instead of 500
Fixes #15967
Merge pull request #17255 from printercu/cors_exception_wrapper

ActionController::InvalidCrossOriginRequest fails with 422 instead of 500