Exception: Common::Exceptions::FailedDependency
- Defined in:
- lib/common/exceptions/failed_dependency.rb
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(detail: nil) ⇒ FailedDependency
constructor
A new instance of FailedDependency.
Methods inherited from BaseError
#i18n_data, #i18n_field, #i18n_interpolated, #i18n_key, #log_to_sentry?, #message, #sentry_type, #status_code
Constructor Details
#initialize(detail: nil) ⇒ FailedDependency
Returns a new instance of FailedDependency.
9 10 11 12 |
# File 'lib/common/exceptions/failed_dependency.rb', line 9 def initialize(detail: nil) @detail = detail super end |
Instance Method Details
#errors ⇒ Object
14 15 16 17 |
# File 'lib/common/exceptions/failed_dependency.rb', line 14 def errors data = @detail.present? ? i18n_data.merge(detail: @detail) : i18n_data Array(SerializableError.new(data)) end |