Exception: ActiveItem::BatchWriteError
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveItem::BatchWriteError
- Defined in:
- lib/active_item/errors.rb
Overview
Raised when batch_write fails to write all items after retries.
Instance Attribute Summary collapse
-
#failed_count ⇒ Object
readonly
Returns the value of attribute failed_count.
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
Instance Method Summary collapse
-
#initialize(model_name:, table:, failed_count:, total_count:) ⇒ BatchWriteError
constructor
A new instance of BatchWriteError.
Constructor Details
#initialize(model_name:, table:, failed_count:, total_count:) ⇒ BatchWriteError
Returns a new instance of BatchWriteError.
25 26 27 28 29 30 31 |
# File 'lib/active_item/errors.rb', line 25 def initialize(model_name:, table:, failed_count:, total_count:) @model_name = model_name @table = table @failed_count = failed_count @total_count = total_count super("#{model_name} batch_write failed: #{failed_count} of #{total_count} items could not be written to #{table} after retries (DynamoDB throughput exceeded).") end |
Instance Attribute Details
#failed_count ⇒ Object (readonly)
Returns the value of attribute failed_count.
23 24 25 |
# File 'lib/active_item/errors.rb', line 23 def failed_count @failed_count end |
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
23 24 25 |
# File 'lib/active_item/errors.rb', line 23 def model_name @model_name end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
23 24 25 |
# File 'lib/active_item/errors.rb', line 23 def table @table end |
#total_count ⇒ Object (readonly)
Returns the value of attribute total_count.
23 24 25 |
# File 'lib/active_item/errors.rb', line 23 def total_count @total_count end |