Exception: ActiveItem::AccessDeniedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_item/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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

#operationObject (readonly)

Returns the value of attribute operation.



8
9
10
# File 'lib/active_item/errors.rb', line 8

def operation
  @operation
end

#original_errorObject (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

#tableObject (readonly)

Returns the value of attribute table.



8
9
10
# File 'lib/active_item/errors.rb', line 8

def table
  @table
end