diff --git a/inverter-bot b/inverter-bot index fc6fccc..547d5a0 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'Error: {err}') + err = re.sub(r'((?:.*)?error:) (.*)', r'\1 \2', err) + reply(update, err) elif not isinstance(e, TimedOut): reply(update, 'exception: ' + str(e))