lint: fix errcheck for txn.Rollback/Commit and insert in platform

Use lint.LogOnErrRollback for deferred Rollbacks in arcgis.go.
Capture and check errors from txn.Commit and CommunicationLogEntryInsert.
This commit is contained in:
Eli Ribble 2026-05-09 02:17:25 +00:00
parent 4008b9aa25
commit 934fb03ca2
No known key found for this signature in database
2 changed files with 10 additions and 6 deletions

View file

@ -56,7 +56,12 @@ func communicationMark(ctx context.Context, user User, comm_id int32, status mod
Type: log_type,
User: &user_id,
}
querypublic.CommunicationLogEntryInsert(ctx, txn, log_entry)
txn.Commit(ctx)
_, err = querypublic.CommunicationLogEntryInsert(ctx, txn, log_entry)
if err != nil {
return fmt.Errorf("insert communication log entry: %w", err)
}
if err := txn.Commit(ctx); err != nil {
return fmt.Errorf("commit: %w", err)
}
return nil
}