summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinverter-bot3
1 files changed, 2 insertions, 1 deletions
diff --git a/inverter-bot b/inverter-bot
index d16359d..f6fac92 100755
--- a/inverter-bot
+++ b/inverter-bot
@@ -88,7 +88,8 @@ def handle_exc(update: Update, e) -> None:
err = json.loads(str(e))['message']
except json.decoder.JSONDecodeError:
err = str(e)
- reply(update, f'<b>Error:</b> {err}')
+ err = re.sub(r'((?:.*)?error:) (.*)', r'<b>\1</b> \2', err)
+ reply(update, err)
elif not isinstance(e, TimedOut):
reply(update, 'exception: ' + str(e))