# File lib/dragonfly/routed_endpoint.rb, line 11 def call(env) params = Utils.symbolize_keys Rack::Request.new(env).params job = @block.call(params.merge(routing_params(env)), @app) Response.new(job, env).to_response rescue Job::NoSHAGiven => e [400, {"Content-Type" => 'text/plain'}, ["You need to give a SHA parameter"]] rescue Job::IncorrectSHA => e [400, {"Content-Type" => 'text/plain'}, ["The SHA parameter you gave (#{e}) is incorrect"]] end