We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df3fc0d commit e0ed37fCopy full SHA for e0ed37f
1 file changed
backend/sqlite/sqlite.go
@@ -100,7 +100,13 @@ func (be *sqliteBackend) CreateTaskHub(ctx context.Context) error {
100
}
101
102
func (be *sqliteBackend) DeleteTaskHub(ctx context.Context) error {
103
- be.Stop(ctx)
+ if be.db == nil {
104
+ return nil
105
+ }
106
+
107
+ if err := be.Stop(ctx); err != nil {
108
+ return fmt.Errorf("failed to stop the backend: %w", err)
109
110
111
if be.options.FilePath == "" {
112
// In-memory DB
@@ -113,7 +119,7 @@ func (be *sqliteBackend) DeleteTaskHub(ctx context.Context) error {
113
119
} else if os.IsNotExist(err) {
114
120
return backend.ErrTaskHubNotFound
115
121
} else {
116
- return err
122
+ return fmt.Errorf("failed to delete the database: %w", err)
117
123
118
124
125
0 commit comments