Exception: ActiveItem::AccessDeniedError
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveItem::AccessDeniedError
- Defined in:
- lib/active_item/errors.rb
Overview
Raised when an IAM policy denies a DynamoDB operation on a table.
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.
11 12 13 14 15 16 17 18 |
# File 'lib/active_item/errors.rb', line 11 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.
9 10 11 |
# File 'lib/active_item/errors.rb', line 9 def model_name @model_name end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
9 10 11 |
# File 'lib/active_item/errors.rb', line 9 def operation @operation end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
9 10 11 |
# File 'lib/active_item/errors.rb', line 9 def original_error @original_error end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
9 10 11 |
# File 'lib/active_item/errors.rb', line 9 def table @table end |