Exception: Angarium::Api::UnpermittedParameter
- Inherits:
-
StandardError
- Object
- StandardError
- Angarium::Api::UnpermittedParameter
- Defined in:
- app/controllers/angarium/api/unpermitted_parameter.rb
Overview
Raised when a request tries to change an attribute the policy doesn't permit (e.g. a privileged SSRF control), so the caller fails loudly with a 422 naming the attribute instead of the change being silently dropped.
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
Instance Method Summary collapse
-
#initialize(attribute) ⇒ UnpermittedParameter
constructor
A new instance of UnpermittedParameter.
Constructor Details
#initialize(attribute) ⇒ UnpermittedParameter
Returns a new instance of UnpermittedParameter.
9 10 11 12 |
# File 'app/controllers/angarium/api/unpermitted_parameter.rb', line 9 def initialize(attribute) @attribute = attribute super("#{attribute} is not permitted") end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
7 8 9 |
# File 'app/controllers/angarium/api/unpermitted_parameter.rb', line 7 def attribute @attribute end |