You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@
14
14
*[#1752](https://github.com/ruby-grape/grape/pull/1752): Fix `include_missing` behavior for aliased parameters - [@jonasoberschweiber](https://github.com/jonasoberschweiber).
15
15
*[#1754](https://github.com/ruby-grape/grape/pull/1754): Allow rescue from non-`StandardError` exceptions to use default error handling - [@jelkster](https://github.com/jelkster).
16
16
*[#1756](https://github.com/ruby-grape/grape/pull/1756): Allow custom Grape exception handlers when the built-in exception handling is enabled - [@soylent](https://github.com/soylent).
17
+
*[#1745](https://github.com/ruby-grape/grape/pull/1745): Rescue truly all exceptions - [@mtsmfm](https://github.com/mtsmfm).
Copy file name to clipboardexpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2086,7 +2086,7 @@ literally accepts every request.
2086
2086
2087
2087
## Exception Handling
2088
2088
2089
-
Grape can be told to rescue all `StandardError`exceptions and return them in the API format.
2089
+
Grape can be told to rescue all exceptions and return them in the API format.
2090
2090
2091
2091
```ruby
2092
2092
classTwitter::API < Grape::API
@@ -2116,7 +2116,7 @@ class Twitter::API < Grape::API
2116
2116
end
2117
2117
```
2118
2118
2119
-
In this case ```UserDefinedError```must be inherited from ```StandardError```.
2119
+
```UserDefinedError```can be inherited from any exception class.
2120
2120
2121
2121
Notice that you could combine these two approaches (rescuing custom errors takes precedence). For example, it's useful for handling all exceptions except Grape validation errors.
0 commit comments