Skip to content

Commit 5e7d9af

Browse files
committed
Document the Error class
1 parent 5c3487d commit 5e7d9af

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pyrogram/api/errors/error.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525

2626
class Error(Exception):
27+
"""This is the base exception class for all Telegram API related errors.
28+
For a finer grained control, see the specific errors below.
29+
"""
2730
ID = None
2831
CODE = None
2932
NAME = None
@@ -65,6 +68,10 @@ def raise_it(rpc_error: RpcError, query_type: type):
6568

6669

6770
class UnknownError(Error):
71+
"""This object represents an Unknown Error, that is, an error which
72+
Pyrogram does not know anything about, yet.
73+
"""
6874
CODE = 520
75+
""":obj:`int`: Error code"""
6976
NAME = "Unknown error"
7077
MESSAGE = "{x}"

0 commit comments

Comments
 (0)