We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2457202 + ec72330 commit f57ff96Copy full SHA for f57ff96
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