Exception: Usps::Imis::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/usps/imis/error.rb

Overview

Base error class for all internal exceptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, metadata = {}) ⇒ Error

A new instance of ApiError

Parameters:

  • message (String)

    The base exception message

  • metadata (Hash) (defaults to: {})

    Additional call-specific metadata to pass through to Bugsnag



17
18
19
20
21
22
# File 'lib/usps/imis/error.rb', line 17

def initialize(message,  = {})
  super(message)
   = 

  Imis.logger(self.class.name).error self
end

Instance Attribute Details

#metadataObject

Additional call-specific metadata to pass through to Bugsnag



10
11
12
# File 'lib/usps/imis/error.rb', line 10

def 
  
end

Instance Method Details

#bugsnag_meta_dataHash

Additional metadata to include in Bugsnag reports

Can include fields at the top level, which will be shows on the custom tab

Can include fields nested under a top-level key, which will be shown on a tab with the top-level key as its name

Returns:

  • (Hash)


33
34
35
# File 'lib/usps/imis/error.rb', line 33

def 
   == {} ? {} : 
end