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
|
|
@ -194,7 +194,9 @@ func (res *communicationR) markCommunication(ctx context.Context, r *http.Reques
|
|||
if err != nil {
|
||||
return communication{}, nhttp.NewBadRequest("can't turn report ID into an int: %w", err)
|
||||
}
|
||||
m(ctx, user, int32(comm_id))
|
||||
if err := m(ctx, user, int32(comm_id)); err != nil {
|
||||
return communication{}, nhttp.NewError("mark communication: %w", err)
|
||||
}
|
||||
result, err := platform.CommunicationFromID(ctx, user, int64(comm_id))
|
||||
if result == nil {
|
||||
return communication{}, nhttp.NewUnauthorized("you are not authorized to modify communication %d", comm_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue