Class: HyperResource::Modules::HTTP::WrapErrors

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/hyper_resource/modules/http/wrap_errors.rb

Defined Under Namespace

Classes: WrappedError

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



14
15
16
17
18
# File 'lib/hyper_resource/modules/http/wrap_errors.rb', line 14

def call(env)
  @app.call(env)
rescue StandardError => e
  raise WrappedError.new(env.method, e)
end