deleteSnapshotFromLocalDB silently ignores all errors #6

Closed
opened 2026-02-08 17:16:21 +01:00 by clawbot · 2 comments
Collaborator

In snapshot.go, deleteSnapshotFromLocalDB() logs errors but always returns nil:

func (v *Vaultik) deleteSnapshotFromLocalDB(snapshotID string) error {
    // ... each step logs error but continues ...
    return nil
}

Callers like PurgeSnapshots check the error and log it, but since this always returns nil, errors during local DB cleanup are silently lost. At minimum, errors should be collected and returned as a combined error.

Ref: parent issue #1

In `snapshot.go`, `deleteSnapshotFromLocalDB()` logs errors but always returns nil: ```go func (v *Vaultik) deleteSnapshotFromLocalDB(snapshotID string) error { // ... each step logs error but continues ... return nil } ``` Callers like `PurgeSnapshots` check the error and log it, but since this always returns nil, errors during local DB cleanup are silently lost. At minimum, errors should be collected and returned as a combined error. Ref: parent issue #1
clawbot self-assigned this 2026-02-20 09:29:29 +01:00
clawbot added the needs-review label 2026-02-20 09:29:29 +01:00
Author
Collaborator

Taking this on now. Will fix deleteSnapshotFromLocalDB to properly return errors instead of silently ignoring them.

Taking this on now. Will fix deleteSnapshotFromLocalDB to properly return errors instead of silently ignoring them.
Author
Collaborator

This is fixed by PR #30 ("Return errors from deleteSnapshotFromLocalDB instead of swallowing them"), which is already labeled merge-ready and assigned to sneak for merge.

This is fixed by PR #30 ("Return errors from deleteSnapshotFromLocalDB instead of swallowing them"), which is already labeled merge-ready and assigned to sneak for merge.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#6