Commit 439c4d7
fix: handle DriverAdapterError for transaction write conflict retries
With Prisma 7's PrismaPg driver adapter, write conflicts (PostgreSQL 40001)
surface as DriverAdapterError with message 'TransactionWriteConflict' instead
of PrismaClientKnownRequestError with code P2034. Without this fix, the
$transaction retry logic silently stops retrying on serialization failures.
Added isDriverAdapterTransactionWriteConflict() check to isPrismaRetriableError()
and updated $transaction catch block to use the unified retriable check.
Co-Authored-By: Eric Allam <eallam@icloud.com>1 parent b622f46 commit 439c4d7
1 file changed
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
40 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
41 | 57 | | |
42 | 58 | | |
43 | 59 | | |
| |||
90 | 106 | | |
91 | 107 | | |
92 | 108 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
101 | 117 | | |
| 118 | + | |
102 | 119 | | |
103 | 120 | | |
104 | 121 | | |
| |||
0 commit comments