Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* [#2918](https://github.com/ruby-grape/grape/pull/2918): Skip the dry-types round trip when a value already is the declared type - [@ericproulx](https://github.com/ericproulx).
* [#2917](https://github.com/ruby-grape/grape/pull/2917): Read path captures out of the router's union match instead of re-running the route's pattern - [@ericproulx](https://github.com/ericproulx).
* [#2921](https://github.com/ruby-grape/grape/pull/2921): Pin the router's request-time isolation regressions through requests instead of its instance variables - [@ericproulx](https://github.com/ericproulx).
* [#2931](https://github.com/ruby-grape/grape/pull/2931): Stop building a backtrace in the default `rescue_from` handler unless the API asked for one - [@ericproulx](https://github.com/ericproulx).
* Your contribution here.

### 4.0.0 (2026-09-07)
Expand Down
4 changes: 3 additions & 1 deletion lib/grape/middleware/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@ def failsafe_payload(headers)
)
end

# No +backtrace:+: #resolved_backtrace reads it off +original_exception+
# when the API asked for one, and only then, since building it is the
# dearest part of rendering the error.
def default_rescue_handler(exception)
error_response(
Grape::Exceptions::ErrorResponse.new(
message: exception.message,
backtrace: exception.backtrace,
original_exception: exception
)
)
Expand Down
Loading