Skip to content

Commit 0371af4

Browse files
committed
Use PostgresErrorCodes
1 parent 44856b0 commit 0371af4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DbExceptionClassifier/PostgreSQL/PostgreSQLExceptionClassifier.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ public class PostgreSQLExceptionClassifier : IDbExceptionClassifier
1111
public bool IsNumericOverflowError(DbException exception) => exception is PostgresException { SqlState: PostgresErrorCodes.NumericValueOutOfRange };
1212
public bool IsUniqueConstraintError(DbException exception) => exception is PostgresException { SqlState: PostgresErrorCodes.UniqueViolation };
1313
public bool IsMaxLengthExceededError(DbException exception) => exception is PostgresException { SqlState: PostgresErrorCodes.StringDataRightTruncation };
14-
public bool IsDeadlockError(DbException exception) => exception is PostgresException { SqlState: "40P01" };
14+
public bool IsDeadlockError(DbException exception) => exception is PostgresException { SqlState: PostgresErrorCodes.DeadlockDetected };
1515
}

0 commit comments

Comments
 (0)