lib/omnihooks/strategy.rb in omnihooks-0.0.1 vs lib/omnihooks/strategy.rb in omnihooks-0.0.2

- old
+ new

@@ -219,11 +219,10 @@ # the request path is recognized. # # @param env [Hash] The Rack environment. def call!(env) # rubocop:disable CyclomaticComplexity, PerceivedComplexity @env = env - return instrument if on_request_path? && OmniHooks.config.allowed_request_methods.include?(request.request_method.downcase.to_sym) @app.call(env) end @@ -251,16 +250,19 @@ def instrument # instance needs to lookup and from the paylook the event type begin evt = get_event evt_type = get_event_type + self.class.instrument(evt_type, evt) if evt rescue => e log(:error, e.message) - [500, {}, [nil]] + log(:error, e.backtrace.join("\n")) + [500, {}, [EMPTY_STRING]] else + log(:debug, "success") # Send a 200 response back to - [200, {}, [nil]] + [200, {}, [EMPTY_STRING]] end end def path_prefix options[:path_prefix] || OmniHooks.config.path_prefix \ No newline at end of file