Exception: EVSS::Letters::ServiceException

Inherits:
ServiceException show all
Defined in:
lib/evss/letters/service_exception.rb

Constant Summary collapse

ERROR_MAP =
{
  serviceError: 'evss.external_service_unavailable',
  notEligible: 'evss.letters.not_eligible',
  letterEligibilityError: 'evss.letters.unable_to_determine_eligibilty',
  letterDestination: 'evss.letters.unprocessable_entity',
  default: 'common.exceptions.internal_server_error'
}.freeze

Instance Attribute Summary

Attributes inherited from ServiceException

#key, #messages

Instance Method Summary collapse

Methods inherited from ServiceException

#initialize

Methods inherited from Common::Exceptions::BaseError

#log_to_sentry?, #message, #sentry_type, #status_code

Constructor Details

This class inherits a constructor from EVSS::ServiceException

Instance Method Details

#errorsObject



16
17
18
19
20
21
22
# File 'lib/evss/letters/service_exception.rb', line 16

def errors
  Array(
    Common::Exceptions::SerializableError.new(
      i18n_data.merge(source: 'EVSS::Letters::Service', meta: { messages: @messages })
    )
  )
end