lint: fix errcheck for txn calls, query results, and unchecked errors
- Fix Rollback/Commit in compliance.go, csv/csv.go, csv/pool.go - Capture and check errors from .One() insert queries in send.go, text.go - Check errors from markFunc, PopulateURL, and hydrate functions - Use lint.LogOnErrCtx for best-effort notification sends
This commit is contained in:
parent
0ec810591e
commit
679d12b48f
10 changed files with 47 additions and 16 deletions
|
|
@ -100,7 +100,9 @@ func ComplianceRequestMailerCreate(ctx context.Context, user User, site_id int64
|
|||
return 0, fmt.Errorf("create background compliance mailer job: %w", err)
|
||||
}
|
||||
event.Updated(event.TypeSite, user.Organization.ID, strconv.Itoa(int(site.ID)))
|
||||
txn.Commit(ctx)
|
||||
if err := txn.Commit(ctx); err != nil {
|
||||
return 0, fmt.Errorf("commit: %w", err)
|
||||
}
|
||||
|
||||
return req.ID, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue