lib/appfuel/handler/base.rb in appfuel-0.2.5 vs lib/appfuel/handler/base.rb in appfuel-0.2.6
- old
+ new
@@ -27,23 +27,17 @@
# response is a Response object.
#
# @param inputs [Hash] inputs to be validated
# @return [Response]
def run(inputs = {}, container = Dry::Container.new)
- begin
- response = resolve_inputs(inputs)
- return response if response.failure?
- valid_inputs = response.ok
+ response = resolve_inputs(inputs)
+ return response if response.failure?
+ valid_inputs = response.ok
- resolve_dependencies(container)
- handler = self.new(container)
- result = handler.call(valid_inputs)
- result = create_response(result) unless response?(result)
- rescue RunError => e
- result = e.response
- rescue StandardError => e
- result = error(e)
- end
+ resolve_dependencies(container)
+ handler = self.new(container)
+ result = handler.call(valid_inputs)
+ result = create_response(result) unless response?(result)
result
end
def error(*args)