Skip to content

Commit

Permalink
Restore use of overallError var name
Browse files Browse the repository at this point in the history
  • Loading branch information
jprenken committed Oct 4, 2024
1 parent e0cf0d6 commit 5da0eee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sa/sa.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (ssa *SQLStorageAuthority) UpdateRegistrationContact(ctx context.Context, r
}
}

result, err := db.WithTransaction(ctx, ssa.dbMap, func(tx db.Executor) (interface{}, error) {
result, overallError := db.WithTransaction(ctx, ssa.dbMap, func(tx db.Executor) (interface{}, error) {
result, err := tx.ExecContext(ctx,
"UPDATE registrations SET contact = ? WHERE id = ? LIMIT 1",
jsonContact,
Expand All @@ -207,8 +207,8 @@ func (ssa *SQLStorageAuthority) UpdateRegistrationContact(ctx context.Context, r

return updatedRegistration, nil
})
if err != nil {
return nil, err
if overallError != nil {
return nil, overallError
}

updatedRegistration, ok := result.(*corepb.Registration)
Expand Down Expand Up @@ -238,7 +238,7 @@ func (ssa *SQLStorageAuthority) UpdateRegistrationKey(ctx context.Context, req *
return nil, err
}

result, err := db.WithTransaction(ctx, ssa.dbMap, func(tx db.Executor) (interface{}, error) {
result, overallError := db.WithTransaction(ctx, ssa.dbMap, func(tx db.Executor) (interface{}, error) {
result, err := tx.ExecContext(ctx,
"UPDATE registrations SET jwk = ?, jwk_sha256 = ? WHERE id = ? LIMIT 1",
jwk,
Expand Down Expand Up @@ -268,8 +268,8 @@ func (ssa *SQLStorageAuthority) UpdateRegistrationKey(ctx context.Context, req *

return updatedRegistration, nil
})
if err != nil {
return nil, err
if overallError != nil {
return nil, overallError
}

updatedRegistration, ok := result.(*corepb.Registration)
Expand Down

0 comments on commit 5da0eee

Please sign in to comment.