Exception: ActiveItem::AccessDeniedError
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveItem::AccessDeniedError
- Defined in:
- lib/active_item/errors.rb
Instance Attribute Summary collapse
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(model_name:, table:, operation:, original_error:) ⇒ AccessDeniedError
constructor
A new instance of AccessDeniedError.
Constructor Details
#initialize(model_name:, table:, operation:, original_error:) ⇒ AccessDeniedError
Returns a new instance of AccessDeniedError.
10 11 12 13 14 15 16 17 |
# File 'lib/active_item/errors.rb', line 10 def initialize(model_name:, table:, operation:, original_error:) @model_name = model_name @table = table @operation = operation @original_error = original_error super("#{model_name} is not allowed to #{operation} on #{table}. " \ "Ensure the IAM role has access to this table.") end |
Instance Attribute Details
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
8 9 10 |
# File 'lib/active_item/errors.rb', line 8 def model_name @model_name end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
8 9 10 |
# File 'lib/active_item/errors.rb', line 8 def operation @operation end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
8 9 10 |
# File 'lib/active_item/errors.rb', line 8 def original_error @original_error end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
8 9 10 |
# File 'lib/active_item/errors.rb', line 8 def table @table end |