From 40296f9dbc74dc5b54769655bef7637d40debe38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?rich=CE=9Brd?= Date: Thu, 23 May 2024 18:37:04 -0400 Subject: [PATCH] fix: do not print the db url on error (#2725) --- waku/common/databases/dburl.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/waku/common/databases/dburl.nim b/waku/common/databases/dburl.nim index a6614ab3d1..7546dc2c97 100644 --- a/waku/common/databases/dburl.nim +++ b/waku/common/databases/dburl.nim @@ -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)