diff --git a/lib/neography/connection.rb b/lib/neography/connection.rb index d07241c..52cfffe 100644 --- a/lib/neography/connection.rb +++ b/lib/neography/connection.rb @@ -213,6 +213,7 @@ def raise_errors(code, exception, message, stacktrace, request, index) when /RelationshipNotFoundException/ ; RelationshipNotFoundException when /NotFoundException/ ; NotFoundException when /UniquePathNotUniqueException/ ; UniquePathNotUniqueException + when /DeadlockDetectedException/ ; DeadlockDetectedException else NeographyError end diff --git a/lib/neography/errors.rb b/lib/neography/errors.rb index 8b9ac49..d7711b6 100644 --- a/lib/neography/errors.rb +++ b/lib/neography/errors.rb @@ -44,4 +44,7 @@ class NotFoundException < NeographyError; end # Thrown when CREATE UNIQUE matches multiple paths. class UniquePathNotUniqueException < NeographyError; end + # Signals that a deadlock between two or more transactions has been detected + class DeadlockDetectedException < NeographyError; end + end