mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Handle param-parsing errors from Rack in ExceptionWrapper
This commit is contained in:
parent
22e39f8b65
commit
0a9b86b0c0
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
* Adds`Rack::Utils::ParameterTypeError` and `Rack::Utils::InvalidParameterError`
|
||||
to the rescue_responses hash in `ExceptionWrapper` (Rack recommends
|
||||
integrators serve 400s for both of these).
|
||||
|
||||
*Grey Baker*
|
||||
|
||||
* Add support for API only apps.
|
||||
ActionController::API is added as a replacement of
|
||||
ActionController::Base for this kind of applications.
|
||||
|
|
|
@ -17,7 +17,9 @@ module ActionDispatch
|
|||
'ActionController::InvalidCrossOriginRequest' => :unprocessable_entity,
|
||||
'ActionDispatch::ParamsParser::ParseError' => :bad_request,
|
||||
'ActionController::BadRequest' => :bad_request,
|
||||
'ActionController::ParameterMissing' => :bad_request
|
||||
'ActionController::ParameterMissing' => :bad_request,
|
||||
'Rack::Utils::ParameterTypeError' => :bad_request,
|
||||
'Rack::Utils::InvalidParameterError' => :bad_request
|
||||
)
|
||||
|
||||
cattr_accessor :rescue_templates
|
||||
|
|
Loading…
Reference in a new issue