We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bd22e9 commit ec72330Copy full SHA for ec72330
1 file changed
pyrogram/api/errors/error.py
@@ -33,7 +33,11 @@ class Error(Exception):
33
MESSAGE = None
34
35
def __init__(self, x: int or RpcError = None, query_type: type = None):
36
- super().__init__("[{} {}]: {}".format(self.CODE, self.ID or self.NAME, self.MESSAGE.format(x=x)))
+ super().__init__("[{} {}]: {}".format(
37
+ self.CODE,
38
+ self.ID or self.NAME,
39
+ str(self) or self.MESSAGE.format(x=x)
40
+ ))
41
42
try:
43
self.x = int(x)
0 commit comments