Add more verbose error message

This commit is contained in:
Dominic Zimmer 2019-09-20 20:03:13 +02:00
parent 19af89c220
commit f052c47d09

View File

@ -55,10 +55,10 @@ class AuthView():
else: else:
break break
except telethon.errors.rpcerrorlist.FloodWaitError as err: except telethon.errors.rpcerrorlist.FloodWaitError as err:
self.stdscr.addstr(f"The telegram servers blocked you for too many retries ({err.seconds}s remaining). ") self.stdscr.addstr(f"The telegram servers blocked you for too many retries. ({err.seconds}s remaining).")
self.stdscr.refresh() self.stdscr.refresh()
except Exception as e: except Exception as e:
self.stdscr.addstr("Incorrect phone number. ") self.stdscr.addstr(f"An error occured: {str(e)}")
self.stdscr.refresh() self.stdscr.refresh()
self.stdscr.addstr("Now authentificate with the code telegram sent to you.") self.stdscr.addstr("Now authentificate with the code telegram sent to you.")
self.stdscr.refresh() self.stdscr.refresh()