Skip to content

Commit 7f49c40

Browse files
committed
Don't catch exception even if after_response is available
1 parent 8d5c6d4 commit 7f49c40

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/grape/middleware/base.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,13 @@ def call(env)
2121

2222
def call!(env)
2323
@env = env
24-
error_class = nil
2524
before
2625
begin
2726
@app_response = @app.call(@env)
28-
rescue => e
29-
error_class = e
3027
ensure
3128
after_response = after
3229
end
33-
34-
after_response || (error_class ? (fail error_class) : @app_response)
30+
after_response || @app_response
3531
end
3632

3733
# @abstract

0 commit comments

Comments
 (0)