From 6302eb858f67252dea27d9ccc83b61099b94b395 Mon Sep 17 00:00:00 2001 From: dsc Date: Thu, 17 Jun 2021 04:11:14 +0200 Subject: [PATCH] Report error for request search --- ircradio/irc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ircradio/irc.py b/ircradio/irc.py index 106d73d..257f062 100644 --- a/ircradio/irc.py +++ b/ircradio/irc.py @@ -121,7 +121,10 @@ class Commands: send_message(target=target, message="usage: !request ") needle = " ".join(args) - songs = Song.search(needle) + try: + songs = Song.search(needle) + except Exception as ex: + return await send_message(target, f"{ex}") if not songs: return await send_message(target, "Not found!")