What changed, and why it matters
This commit simply renames an internal error variable from ErrRetriesExceeded to ErrTxRetriesExceeded across three files. The error message text and behavior remain unchanged. There is no security relevance.
No security action needed. Treat as routine refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A pure identifier rename in the sqldb/v2 package. The exported variable ErrRetriesExceeded is renamed to ErrTxRetriesExceeded, and all references are updated. The underlying error string ‘db tx retries exceeded’ is identical, and no logic changes.
Changed components
sqldb/v2/interfaces.gosqldb/v2/sqlerrors.gosqldb/v2/sqlerrors_no_sqlite.goInspect captured patch +5 / −5
diff --git a/sqldb/v2/interfaces.go b/sqldb/v2/interfaces.go
index d894a16..caec453 100644
--- a/sqldb/v2/interfaces.go
+++ b/sqldb/v2/interfaces.go
@@ -368,7 +368,7 @@ func ExecuteSQLTransactionWithRetry(ctx context.Context, makeTx MakeTx,
// If we get to this point, then we weren't able to successfully commit
// a tx given the max number of retries.
- return ErrRetriesExceeded
+ return ErrTxRetriesExceeded
}
// ExecTx is a wrapper for txBody to abstract the creation and commit of a db
diff --git a/sqldb/v2/sqlerrors.go b/sqldb/v2/sqlerrors.go
index 9f9151c..5e9fd32 100644
--- a/sqldb/v2/sqlerrors.go
+++ b/sqldb/v2/sqlerrors.go
@@ -14,9 +14,9 @@ import (
)
var (
- // ErrRetriesExceeded is returned when a transaction is retried more
+ // ErrTxRetriesExceeded is returned when a transaction is retried more
// than the max allowed valued without a success.
- ErrRetriesExceeded = errors.New("db tx retries exceeded")
+ ErrTxRetriesExceeded = errors.New("db tx retries exceeded")
// postgresErrMsgs are strings that signify retriable errors resulting
// from serialization failures.
diff --git a/sqldb/v2/sqlerrors_no_sqlite.go b/sqldb/v2/sqlerrors_no_sqlite.go
index 717d941..ae79b7f 100644
--- a/sqldb/v2/sqlerrors_no_sqlite.go
+++ b/sqldb/v2/sqlerrors_no_sqlite.go
@@ -11,9 +11,9 @@ import (
)
var (
- // ErrRetriesExceeded is returned when a transaction is retried more
+ // ErrTxRetriesExceeded is returned when a transaction is retried more
// than the max allowed valued without a success.
- ErrRetriesExceeded = errors.New("db tx retries exceeded")
+ ErrTxRetriesExceeded = errors.New("db tx retries exceeded")
)
// MapSQLError attempts to interpret a given error as a database agnostic SQL
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.