Exception: Common::Exceptions::ValidationErrorsBadRequest

Inherits:
ValidationErrors show all
Defined in:
lib/common/exceptions/validation_errors_bad_request.rb

Instance Attribute Summary

Attributes inherited from ValidationErrors

#resource

Instance Method Summary collapse

Methods inherited from ValidationErrors

#errors, #initialize

Methods inherited from BaseError

#errors, #i18n_data, #i18n_field, #i18n_interpolated, #i18n_key, #log_to_sentry?, #message, #sentry_type

Constructor Details

This class inherits a constructor from Common::Exceptions::ValidationErrors

Instance Method Details

#error_attributes(key, message, _full_message) ⇒ Object (private)



14
15
16
17
18
19
20
# File 'lib/common/exceptions/validation_errors_bad_request.rb', line 14

def error_attributes(key, message, _full_message)
  i18n_data.merge(
    title: "invalid value for #{key}",
    detail: "#{message} is not valid for #{key}",
    source: { pointer: key.to_s }
  )
end

#status_codeObject



8
9
10
# File 'lib/common/exceptions/validation_errors_bad_request.rb', line 8

def status_code
  400
end