From ef0a3d0a320cac845ac9b735a8acdc5cfa2e293e Mon Sep 17 00:00:00 2001 From: James Gerity Date: Sun, 14 Aug 2022 12:42:56 -0400 Subject: [PATCH] Log database errors more concisely Co-authored-by: Florian Strzelecki --- sopel/modules/seen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sopel/modules/seen.py b/sopel/modules/seen.py index 932eb010fb..a9936527f5 100644 --- a/sopel/modules/seen.py +++ b/sopel/modules/seen.py @@ -77,5 +77,5 @@ def note(bot, trigger): bot.db.set_nick_value(nick, 'seen_channel', trigger.sender) bot.db.set_nick_value(nick, 'seen_message', trigger) bot.db.set_nick_value(nick, 'seen_action', trigger.ctcp is not None) - except SQLAlchemyError: - logger.exception("Database write failed") + except SQLAlchemyError as error: + logger.error("Unable to save seen, database error: %s" % error)