Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not print the db url on error #2725

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions waku/common/databases/dburl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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