Skip to content

Commit

Permalink
exception for all telegram api errors
Browse files Browse the repository at this point in the history
Signed-off-by: anasty17 <[email protected]>
  • Loading branch information
anasty17 committed Nov 25, 2021
1 parent 90242cc commit bed6a8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/helper/mirror_utils/upload_utils/pyrogramEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
import threading

from pyrogram.errors import FloodWait
from pyrogram.errors import FloodWait, RPCError

from bot import app, DOWNLOAD_DIR, AS_DOCUMENT, AS_DOC_USERS, AS_MEDIA_USERS, CUSTOM_FILENAME
from bot.helper.ext_utils.fs_utils import take_ss, get_media_info
Expand Down Expand Up @@ -136,7 +136,7 @@ def upload_file(self, up_path, filee, dirpath):
except FloodWait as f:
LOGGER.info(f)
time.sleep(f.x)
except Exception as e:
except RPCError as e:
LOGGER.error(str(e))
self.is_cancelled = True
self.__listener.onUploadError(str(e))
Expand Down

0 comments on commit bed6a8b

Please sign in to comment.