forked from mystiq/dex
postgres: improve readability of error check
This commit is contained in:
parent
9b9013a560
commit
aa068b667a
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ var (
|
|||
|
||||
err = tx.Commit()
|
||||
if err != nil {
|
||||
if pqErr, ok := err.(*pq.Error); ok && pqErr.Code == "40001" {
|
||||
if pqErr, ok := err.(*pq.Error); ok && pqErr.Code.Name() == "serialization_failure" {
|
||||
// serialization error; retry
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue