Skip to content

Commit f57ff96

Browse files
committed
Merge branch 'master' into dispatcher
2 parents 2457202 + ec72330 commit f57ff96

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyrogram/api/errors/error.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ class Error(Exception):
3333
MESSAGE = None
3434

3535
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)))
36+
super().__init__("[{} {}]: {}".format(
37+
self.CODE,
38+
self.ID or self.NAME,
39+
str(self) or self.MESSAGE.format(x=x)
40+
))
3741

3842
try:
3943
self.x = int(x)

0 commit comments

Comments
 (0)