diff --git a/modules/handlers/transfer.py b/modules/handlers/transfer.py index da6d45f..aab0702 100644 --- a/modules/handlers/transfer.py +++ b/modules/handlers/transfer.py @@ -62,6 +62,8 @@ async def transfer_handler(event): await status_message.finish( path=os.path.join(last_remote_root_path, name), size=event.file.size ) + except KeyError as e: + await event.reply(logger("Error: %s\nresponse: %s" % (e, response_dict))) except Exception as e: await event.reply("Error: %s" % logger(e)) @@ -118,6 +120,10 @@ async def transfer_handler(event): path=os.path.join(last_remote_root_path, name), size=message.file.size, ) + except KeyError as e: + await event.reply( + logger("Error: %s\nresponse: %s" % (e, response_dict)) + ) except Exception as e: await event.reply("Error: %s" % logger(e)) else: diff --git a/modules/handlers/url.py b/modules/handlers/url.py index 094f3f5..72333e5 100644 --- a/modules/handlers/url.py +++ b/modules/handlers/url.py @@ -70,6 +70,8 @@ async def url_handler(event): path=os.path.join(last_remote_root_path, response_dict["name"]), size=total_length, ) + except KeyError as e: + await event.reply(logger("Error: %s\nresponse: %s" % (e, response_dict))) except Exception as e: logger(e) await status_message.report_error(e)