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