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

#error_key, #initialize, #messages_has_key?

Methods inherited from Common::Exceptions::BaseError

#i18n_data, #i18n_field, #i18n_interpolated, #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

#i18n_keyObject (private)



26
27
28
# File 'lib/evss/letters/service_exception.rb', line 26

def i18n_key
  @key
end