mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-27 07:06:42 +00:00
fix: do not print the db url on error (#2725)
This commit is contained in:
parent
cbaefeb3ea
commit
40296f9dbc
@ -8,13 +8,13 @@ proc validateDbUrl*(dbUrl: string): Result[string, string] =
|
||||
if "sqlite" in dbUrl or dbUrl == "" or dbUrl == "none" or dbUrl.match(regex):
|
||||
return ok(dbUrl)
|
||||
else:
|
||||
return err("invalid 'db url' option format: " & dbUrl)
|
||||
return err("invalid 'db url' option format")
|
||||
|
||||
proc getDbEngine*(dbUrl: string): Result[string, string] =
|
||||
let dbUrlParts = dbUrl.split("://", 1)
|
||||
|
||||
if dbUrlParts.len != 2:
|
||||
return err("Incorrect dbUrl : " & dbUrl)
|
||||
return err("Incorrect dbUrl")
|
||||
|
||||
let engine = dbUrlParts[0]
|
||||
return ok(engine)
|
||||
@ -23,7 +23,7 @@ proc getDbPath*(dbUrl: string): Result[string, string] =
|
||||
let dbUrlParts = dbUrl.split("://", 1)
|
||||
|
||||
if dbUrlParts.len != 2:
|
||||
return err("Incorrect dbUrl : " & dbUrl)
|
||||
return err("Incorrect dbUrl")
|
||||
|
||||
let path = dbUrlParts[1]
|
||||
return ok(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user