| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Rename #source_extract to #source_extracts in ExceptionWrapper
|
| |
| |
| |
| |
| | |
It returns multiple source extracts since 1ed264bc. Also cleaned its
result structure, as we no longer need the file in a code extract.
|
|/
|
|
|
|
| |
If a trace isn't an application one, then it comes from a framework.
That's the definition of framework trace. We can speed up the traces
generation if we don't double check that.
|
|
|
|
|
|
| |
Those three can be nil when exception backtrace is nil. This happens and
that forced a couple of nil guards in the code. I'm proposing to make
those always return an array, even on nil backtrace.
|
|
|
|
|
| |
ActionDispatch::ExceptionWrapper seems to be the more natural place for
this method to live in.
|
|
|
|
| |
Fixes #15967
|
|
|
|
|
|
| |
Provide the ability to extract the source code of the entire exception stack
trace, not just the frame raising the error. This improves debugging
capability of the error page, especially for framework-related errors.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
sebasoga/change_strong_parameters_require_behaviour"
This reverts commit c2b5a8e61ba0f35015e6ac949a5c8fce2042a1f2, reversing
changes made to 1918b12c0429caec2a6134ac5e5b42ade103fe90.
See: https://github.com/rails/rails/pull/9660#issuecomment-27627493
|
|\
| |
| |
| |
| | |
sebasoga/change_strong_parameters_require_behaviour
Change ActionController::Parameters#require behavior when value is empty
|
| |
| |
| |
| |
| | |
When the value for the required key is empty an ActionController::ParameterMissing is raised which gets caught by ActionController::Base and turned into a 400 Bad Request reply with a message in the body saying the key is missing, which is misleading.
With these changes, ActionController::EmptyParameter will be raised which ActionController::Base will catch and turn into a 400 Bad Request reply with a message in the body saying the key value is empty.
|
| |
| |
| | |
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|
|\ \
| | |
| | | |
failure to parse params should trigger a 400 Bad Request
|
| |/ |
|
|/ |
|
| |
|
|
|
|
| |
actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:99: IO#lines is deprecated; use #each_line instead
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently Rack raises a TypeError when it encounters a malformed or
ambiguous hash like `foo[]=bar&foo[4]=bar`. Rather than pass this
through to the application this commit captures the exception and
re-raises it using a new ActionController::BadRequest exception.
The new ActionController::BadRequest exception returns a 400 error
instead of the 500 error that would've been returned by the original
TypeError. This allows exception notification libraries to ignore
these errors if so desired.
Closes #3051
|
| |
|
|
|
|
| |
format, rather than responding with a head :not_acceptable (406)
|
| |
|
|
|