diff --git a/lib/new_relic/agent/log_event_attributes.rb b/lib/new_relic/agent/log_event_attributes.rb index 628236dde2..22ff4d8752 100644 --- a/lib/new_relic/agent/log_event_attributes.rb +++ b/lib/new_relic/agent/log_event_attributes.rb @@ -46,7 +46,7 @@ def initialize(attribute, limit, msg = "Can't truncate") class InvalidTypeError < StandardError attr_reader :attribute - def initialize(attribute, msg = "Invalid attribute type") + def initialize(attribute, msg = 'Invalid attribute type') @attribute = attribute super(msg) end @@ -88,6 +88,7 @@ def truncate_attribute(attribute, limit) attribute = attribute.slice(0..(limit - 1)) end when TrueClass, FalseClass + attribute else raise InvalidTypeError.new(attribute) end