Exception: Common::Exceptions::OpenIdServiceError
- Defined in:
- lib/common/exceptions/open_id_service_error.rb
Overview
Validation Error - an ActiveModel having validation errors, can be sent to this exception
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(options = {}) ⇒ OpenIdServiceError
constructor
A new instance of OpenIdServiceError.
Methods inherited from BaseError
#i18n_data, #i18n_field, #i18n_interpolated, #i18n_key, #log_to_sentry?, #message, #sentry_type, #status_code
Constructor Details
#initialize(options = {}) ⇒ OpenIdServiceError
Returns a new instance of OpenIdServiceError.
12 13 14 15 16 17 |
# File 'lib/common/exceptions/open_id_service_error.rb', line 12 def initialize( = {}) @detail = [:detail] @code = [:code] @status = [:status] @source = [:source] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
10 11 12 |
# File 'lib/common/exceptions/open_id_service_error.rb', line 10 def code @code end |
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
10 11 12 |
# File 'lib/common/exceptions/open_id_service_error.rb', line 10 def detail @detail end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
10 11 12 |
# File 'lib/common/exceptions/open_id_service_error.rb', line 10 def status @status end |
Instance Method Details
#errors ⇒ Object
19 20 21 |
# File 'lib/common/exceptions/open_id_service_error.rb', line 19 def errors Array(SerializableError.new(i18n_data.merge(detail: @detail, code: @code, status: @status, source: @source))) end |