Skip to content

Commit 7279b9a

Browse files
committed
return if tx failed
1 parent 8a61541 commit 7279b9a

File tree

1 file changed

+4
-0
lines changed
  • coderd/workspaceapps

1 file changed

+4
-0
lines changed

coderd/workspaceapps/db.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,10 @@ func (p *DBTokenProvider) auditInitRequest(ctx context.Context, w http.ResponseW
490490
}, nil)
491491
if err != nil {
492492
p.Logger.Error(ctx, "update workspace app audit session failed", slog.Error(err))
493+
494+
// Avoid spamming the audit log if deduplication failed, this should
495+
// only happen if there are problems communicating with the database.
496+
return
493497
}
494498

495499
if sessionID == uuid.Nil {

0 commit comments

Comments
 (0)