Exception: VIC::IDCardAttributeError
- Inherits:
-
Common::Exceptions::BaseError
- Object
- StandardError
- Common::Exceptions::BaseError
- VIC::IDCardAttributeError
- Defined in:
- lib/vic/id_card_attribute_error.rb
Constant Summary collapse
- VIC002 =
{ status: 403, code: 'VIC002', detail: 'No EDIPI or not found in VA Profile' }.freeze
- VIC010 =
{ status: 403, code: 'VIC010', detail: 'Could not verify Veteran status' }.freeze
- NOT_ELIGIBLE =
{ status: 403, detail: 'Not eligible for a Veteran ID Card' }.freeze
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(options = {}) ⇒ IDCardAttributeError
constructor
A new instance of IDCardAttributeError.
Methods inherited from Common::Exceptions::BaseError
#i18n_data, #i18n_field, #i18n_interpolated, #i18n_key, #log_to_sentry?, #message, #sentry_type, #status_code
Constructor Details
#initialize(options = {}) ⇒ IDCardAttributeError
Returns a new instance of IDCardAttributeError.
14 15 16 17 18 |
# File 'lib/vic/id_card_attribute_error.rb', line 14 def initialize( = {}) @detail = [:detail] || i18n_field(:detail, {}) @code = [:code] || i18n_field(:code, {}) @status = [:status] || i18n_field(:status, {}) end |
Instance Method Details
#errors ⇒ Object
20 21 22 |
# File 'lib/vic/id_card_attribute_error.rb', line 20 def errors Array(Common::Exceptions::SerializableError.new(i18n_data.merge(detail: @detail, code: @code, status: @status))) end |