summaryrefslogtreecommitdiff
path: root/internal/db/bundb/bundb.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/bundb.go')
-rw-r--r--internal/db/bundb/bundb.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/db/bundb/bundb.go b/internal/db/bundb/bundb.go
index 47fe4fb47..ebdbc4ba2 100644
--- a/internal/db/bundb/bundb.go
+++ b/internal/db/bundb/bundb.go
@@ -204,7 +204,11 @@ func NewBunDBService(ctx context.Context) (db.DB, error) {
}
func sqliteConn(ctx context.Context) (*DBConn, error) {
+ // validate db address has actually been set
dbAddress := viper.GetString(config.Keys.DbAddress)
+ if dbAddress == "" {
+ return nil, fmt.Errorf("'%s' was not set when attempting to start sqlite", config.Keys.DbAddress)
+ }
// Drop anything fancy from DB address
dbAddress = strings.Split(dbAddress, "?")[0]