Skip to content

Commit

Permalink
dbconn truncate possible too long error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivansete-status committed Feb 6, 2025
1 parent ce7f09a commit 03aa64a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion waku/common/databases/db_postgres/dbconn.nim
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ proc check(db: DbConn): Result[void, string] =
return err("exception in check: " & getCurrentExceptionMsg())

if message.len > 0:
return err($message)
let truncatedErr = message[0 .. 80]
## libpq sometimes gives extremely long error messages
return err(truncatedErr)

return ok()

Expand Down

0 comments on commit 03aa64a

Please sign in to comment.