Exception: Common::Exceptions::ParametersMissing
- Defined in:
- lib/common/exceptions/parameters_missing.rb
Overview
Parameter Missing - required parameter was not provided
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(params) ⇒ ParametersMissing
constructor
A new instance of ParametersMissing.
Methods inherited from BaseError
#i18n_data, #i18n_field, #i18n_interpolated, #i18n_key, #log_to_sentry?, #message, #sentry_type, #status_code
Constructor Details
#initialize(params) ⇒ ParametersMissing
Returns a new instance of ParametersMissing.
12 13 14 |
# File 'lib/common/exceptions/parameters_missing.rb', line 12 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
10 11 12 |
# File 'lib/common/exceptions/parameters_missing.rb', line 10 def params @params end |
Instance Method Details
#errors ⇒ Object
16 17 18 19 20 21 |
# File 'lib/common/exceptions/parameters_missing.rb', line 16 def errors @params.map do |param| detail = i18n_field(:detail, param:) SerializableError.new(i18n_data.merge(detail:)) end end |