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
|
|
@ -47,11 +47,14 @@ func ReviewPoolCreate(ctx context.Context, user User, task_id int32, status stri
|
|||
if err != nil {
|
||||
return 0, fmt.Errorf("status '%s' is not recognized: %w", status, err)
|
||||
}
|
||||
review_task.Update(ctx, txn, &models.ReviewTaskSetter{
|
||||
err = review_task.Update(ctx, txn, &models.ReviewTaskSetter{
|
||||
Resolution: omitnull.From(resolution),
|
||||
Reviewed: omitnull.From(time.Now()),
|
||||
ReviewerID: omitnull.From(int32(user.ID)),
|
||||
})
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("update review task: %w", err)
|
||||
}
|
||||
review_task_pool, err := models.ReviewTaskPools.Query(
|
||||
models.SelectWhere.ReviewTaskPools.ReviewTaskID.EQ(review_task.ID),
|
||||
).One(ctx, txn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue