mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-31 02:09:58 +03:00
Make input entity errors less useless
The `repr()` of TL types is just the class name and pointer, which is pretty much completely useless for any purpose. This changes the error to use `str()` instead, which shows the contents of the entity (i.e. the user ID)
This commit is contained in:
parent
52ae9f09ce
commit
6cf6b156fc
|
@ -459,7 +459,7 @@ class UserMethods:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'Could not find the input entity for {!r}. Please read https://'
|
'Could not find the input entity for {!s}. Please read https://'
|
||||||
'docs.telethon.dev/en/latest/concepts/entities.html to'
|
'docs.telethon.dev/en/latest/concepts/entities.html to'
|
||||||
' find out more details.'
|
' find out more details.'
|
||||||
.format(peer)
|
.format(peer)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user