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
|
|
@ -43,9 +43,12 @@ func setPhoneStatus(ctx context.Context, txn bob.Executor, src types.E164, statu
|
|||
if err != nil {
|
||||
return fmt.Errorf("Failed to determine if '%s' is subscribed: %w", src, err)
|
||||
}
|
||||
phone.Update(ctx, txn, &models.CommsPhoneSetter{
|
||||
err = phone.Update(ctx, txn, &models.CommsPhoneSetter{
|
||||
Status: omit.From(status),
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("update phone status: %w", err)
|
||||
}
|
||||
log.Info().Str("src", src.PhoneString()).Str("status", string(status)).Msg("Set number subscribed")
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue