Class: Google::Cloud::Spanner::Errors::TransactionMutationLimitExceededError
- Inherits:
-
ActiveRecord::StatementInvalid
- Object
- ActiveRecord::StatementInvalid
- Google::Cloud::Spanner::Errors::TransactionMutationLimitExceededError
- Defined in:
- lib/active_record/connection_adapters/spanner/errors/transaction_mutation_limit_exceeded_error.rb
Overview
Custom exception raised when a transaction exceeds the mutation limit in Google Cloud Spanner. This provides a specific error class for a common, recoverable scenario.
Constant Summary collapse
- ERROR_MESSAGE =
"The transaction contains too many mutations".freeze
Class Method Summary collapse
Class Method Details
.is_mutation_limit_error?(error) ⇒ Boolean
16 17 18 19 20 |
# File 'lib/active_record/connection_adapters/spanner/errors/transaction_mutation_limit_exceeded_error.rb', line 16 def self.is_mutation_limit_error? error return false if error.nil? error.is_a?(Google::Cloud::InvalidArgumentError) && error.&.include?(ERROR_MESSAGE) end |