@@ -4,18 +4,18 @@ Error Handling
44Errors are inevitable when working with the API, and they must be correctly handled with ``try..except `` blocks.
55
66There are many errors that Telegram could return, but they all fall in one of these categories
7- (which are in turn children of the :obj: `pyrogram.Error ` superclass)
7+ (which are in turn children of the :obj: `RPCError < pyrogram.RPCError> ` superclass)
88
9- - :obj: `303 - See Other <pyrogram.api. errors.SeeOther> `
10- - :obj: `400 - Bad Request <pyrogram.api. errors.BadRequest> `
11- - :obj: `401 - Unauthorized <pyrogram.api. errors.Unauthorized> `
12- - :obj: `403 - Forbidden <pyrogram.api. errors.Forbidden> `
13- - :obj: `406 - Not Acceptable <pyrogram.api. errors.NotAcceptable> `
14- - :obj: `420 - Flood <pyrogram.api. errors.Flood> `
15- - :obj: `500 - Internal Server Error <pyrogram.api. errors.InternalServerError> `
9+ - :obj: `303 - See Other <pyrogram.errors.SeeOther> `
10+ - :obj: `400 - Bad Request <pyrogram.errors.BadRequest> `
11+ - :obj: `401 - Unauthorized <pyrogram.errors.Unauthorized> `
12+ - :obj: `403 - Forbidden <pyrogram.errors.Forbidden> `
13+ - :obj: `406 - Not Acceptable <pyrogram.errors.NotAcceptable> `
14+ - :obj: `420 - Flood <pyrogram.errors.Flood> `
15+ - :obj: `500 - Internal Server Error <pyrogram.errors.InternalServerError> `
1616
1717As stated above, there are really many (too many) errors, and in case Pyrogram does not know anything yet about a
18- specific one, it raises a special :obj: `520 Unknown Error <pyrogram.api. errors.UnknownError> ` exception and logs it
18+ specific one, it raises a special :obj: `520 Unknown Error <pyrogram.errors.UnknownError> ` exception and logs it
1919in the ``unknown_errors.txt `` file. Users are invited to report these unknown errors; in later versions of Pyrogram
2020some kind of automatic error reporting module might be implemented.
2121
@@ -24,7 +24,7 @@ Examples
2424
2525.. code-block :: python
2626
27- from pyrogram.api. errors import (
27+ from pyrogram.errors import (
2828 BadRequest, Flood, InternalServerError,
2929 SeeOther, Unauthorized, UnknownError
3030 )
@@ -45,13 +45,13 @@ Examples
4545 pass
4646
4747 Exception objects may also contain some informative values.
48- E.g.: :obj: `FloodWait <pyrogram.api. errors.exceptions.flood_420.FloodWait> ` holds the amount of seconds you have to wait
48+ E.g.: :obj: `FloodWait <pyrogram.errors.exceptions.flood_420.FloodWait> ` holds the amount of seconds you have to wait
4949before you can try again. The value is always stored in the ``x `` field of the returned exception object:
5050
5151.. code-block :: python
5252
5353 import time
54- from pyrogram.api. errors import FloodWait
54+ from pyrogram.errors import FloodWait
5555
5656 try :
5757 ...
0 commit comments