Exception: Usps::Imis::Errors::MapperError

Inherits:
Usps::Imis::Error show all
Defined in:
lib/usps/imis/errors/mapper_error.rb

Overview

Exception raised by a Mapper

Instance Attribute Summary

Attributes inherited from Usps::Imis::Error

#metadata

Instance Method Summary collapse

Methods inherited from Usps::Imis::Error

#bugsnag_meta_data

Constructor Details

#initialize(metadata = {}) ⇒ MapperError

Create a new instance of MapperError



13
14
15
16
# File 'lib/usps/imis/errors/mapper_error.rb', line 13

def initialize( = {})
  @metadata = 
  super(message, )
end

Instance Method Details

#messageObject

Exception message including the unrecognized field



20
21
22
23
24
25
# File 'lib/usps/imis/errors/mapper_error.rb', line 20

def message
  <<~MESSAGE.chomp
    Mapper does not recognize field: "#{[:field_key]}".
    Please report what data you are attempting to work with to ITCom leadership.
  MESSAGE
end