Exception: ZeroRuby::MutationAlreadyProcessedError
- Defined in:
- lib/zero_ruby/errors.rb
Overview
Raised when a mutation has already been processed (duplicate)
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#last_mutation_id ⇒ Object
readonly
Returns the value of attribute last_mutation_id.
-
#received_id ⇒ Object
readonly
Returns the value of attribute received_id.
Attributes inherited from Error
Instance Method Summary collapse
- #error_type ⇒ Object
-
#initialize(client_id:, received_id:, last_mutation_id:) ⇒ MutationAlreadyProcessedError
constructor
A new instance of MutationAlreadyProcessedError.
Constructor Details
#initialize(client_id:, received_id:, last_mutation_id:) ⇒ MutationAlreadyProcessedError
Returns a new instance of MutationAlreadyProcessedError.
63 64 65 66 67 68 |
# File 'lib/zero_ruby/errors.rb', line 63 def initialize(client_id:, received_id:, last_mutation_id:) @client_id = client_id @received_id = received_id @last_mutation_id = last_mutation_id super("Mutation #{received_id} already processed for client #{client_id}. Last mutation ID: #{last_mutation_id}") end |
Instance Attribute Details
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
61 62 63 |
# File 'lib/zero_ruby/errors.rb', line 61 def client_id @client_id end |
#last_mutation_id ⇒ Object (readonly)
Returns the value of attribute last_mutation_id.
61 62 63 |
# File 'lib/zero_ruby/errors.rb', line 61 def last_mutation_id @last_mutation_id end |
#received_id ⇒ Object (readonly)
Returns the value of attribute received_id.
61 62 63 |
# File 'lib/zero_ruby/errors.rb', line 61 def received_id @received_id end |
Instance Method Details
#error_type ⇒ Object
70 71 72 |
# File 'lib/zero_ruby/errors.rb', line 70 def error_type "alreadyProcessed" end |