Skip to content

Commit

Permalink
Back out 'error_for_4xx' covered by 'error_statuses' now
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpenny committed Dec 29, 2020
1 parent 330befc commit 4abaf03
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion lib/ddtrace/contrib/grape/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class Settings < Contrib::Configuration::Settings
end

option :service_name, default: Ext::SERVICE_NAME
option :error_for_4xx, default: true

option :error_statuses, default: nil do |o|
o.setter do |new_value, _old_value|
Expand Down
14 changes: 0 additions & 14 deletions lib/ddtrace/contrib/grape/endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ def service_name
datadog_configuration[:service_name]
end

def error_for_4xx?
datadog_configuration[:error_for_4xx]
end

def analytics_enabled?
Contrib::Analytics.enabled?(datadog_configuration[:analytics_enabled])
end
Expand All @@ -229,16 +225,6 @@ def enabled?
def datadog_configuration
Datadog.configuration[:grape]
end

def exception_is_error?(exception)
return false unless exception

if !error_for_4xx? && defined?(::Grape::Exceptions::Base) && exception.class < ::Grape::Exceptions::Base
status = exception.status
end

status.nil? || status > 499
end
end
end
end
Expand Down

0 comments on commit 4abaf03

Please sign in to comment.