Exception: Angarium::Api::UnpermittedParameter

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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

#attributeObject (readonly)

Returns the value of attribute attribute.



7
8
9
# File 'app/controllers/angarium/api/unpermitted_parameter.rb', line 7

def attribute
  @attribute
end