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
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
*[#1227](https://github.com/ruby-grape/grape/pull/1227): Store `message_key` on Grape::Exceptions::Validation - [@stjhimy](https://github.com/sthimy).
7
7
*[#1232](https://github.com/ruby-grape/grape/pull/1232): Helpers are now available inside `rescue_from` - [@namusyaka](https://github.com/namusyaka).
8
8
*[#1237](https://github.com/ruby-grape/grape/pull/1237): Allow multiple parameters in `given`, which behaves as if the scopes were nested in the inputted order - [@ochagata](https://github.com/ochagata).
9
+
*[#1238](https://github.com/ruby-grape/grape/pull/1238): Call `after` of middleware on error - [@namusyaka](https://github.com/namusyaka).
Copy file name to clipboardExpand all lines: UPGRADING.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,25 @@
1
1
Upgrading Grape
2
2
===============
3
3
4
+
### Upgrading to >= 0.15.0
5
+
6
+
#### Changes to behavior of `after` method of middleware on error
7
+
8
+
The `after` method of the middleware is now called on error.
9
+
The following code would work correctly.
10
+
11
+
```ruby
12
+
classErrorMiddleware < Grape::Middleware::Base
13
+
defafter
14
+
if@api_response[0] ==500
15
+
env['rack.logger'].debug("Raised error on #{env['PATH_INFO']}")
16
+
end
17
+
end
18
+
end
19
+
```
20
+
21
+
See [#1147](https://github.com/ruby-grape/grape/issues/1147) and [#1240](https://github.com/ruby-grape/grape/issues/1240) for discussion of the issues.
22
+
4
23
### Upgrading to >= 0.14.0
5
24
6
25
#### Changes to availability of DSL methods in filters
0 commit comments