Class: Honeycomb::Aws::ApiHandler::JsonError

Inherits:
Aws::Json::ErrorHandler
  • Object
show all
Defined in:
lib/honeycomb/integrations/aws.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ JsonError

Returns a new instance of JsonError.



298
299
300
301
302
303
304
305
306
# File 'lib/honeycomb/integrations/aws.rb', line 298

def initialize(context)
  body = context.http_response.body_contents
  json = ::Aws::Json.load(body) || {}
  @code = error_code(json, context)
  @message = error_message(code, json)
rescue ::Aws::Json::ParseError
  @code = http_status_error_code(context)
  @message = ""
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



296
297
298
# File 'lib/honeycomb/integrations/aws.rb', line 296

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



296
297
298
# File 'lib/honeycomb/integrations/aws.rb', line 296

def message
  @message
end