Exception: JSONAPI::Exceptions::ParameterNotAllowed
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#param ⇒ Object
Returns the value of attribute param.
Attributes inherited from Error
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(param, error_object_overrides = {}) ⇒ ParameterNotAllowed
constructor
A new instance of ParameterNotAllowed.
Methods inherited from Error
Constructor Details
#initialize(param, error_object_overrides = {}) ⇒ ParameterNotAllowed
Returns a new instance of ParameterNotAllowed.
393 394 395 396 |
# File 'lib/jsonapi/exceptions.rb', line 393 def initialize(param, error_object_overrides = {}) @param = param super(error_object_overrides) end |
Instance Attribute Details
#param ⇒ Object
Returns the value of attribute param.
391 392 393 |
# File 'lib/jsonapi/exceptions.rb', line 391 def param @param end |
Instance Method Details
#errors ⇒ Object
398 399 400 401 402 403 404 405 |
# File 'lib/jsonapi/exceptions.rb', line 398 def errors [create_error_object(code: JSONAPI::PARAM_NOT_ALLOWED, status: :bad_request, title: I18n.translate('jsonapi-resources.exceptions.parameter_not_allowed.title', default: 'Param not allowed'), detail: I18n.translate('jsonapi-resources.exceptions.parameters_not_allowed.detail', default: "#{param} is not allowed.", param: param))] end |