2019-05-12 17:26:55 +00:00
|
|
|
RPC Errors
|
|
|
|
==========
|
2019-05-09 02:28:46 +00:00
|
|
|
|
2019-05-13 13:57:49 +00:00
|
|
|
All Pyrogram API errors live inside the ``errors`` sub-package: ``pyrogram.errors``.
|
|
|
|
The errors ids listed here are shown as *UPPER_SNAKE_CASE*, but the actual exception names to import from Pyrogram
|
|
|
|
follow the usual *PascalCase* convention.
|
2019-05-09 02:28:46 +00:00
|
|
|
|
|
|
|
.. code-block:: python
|
2019-05-16 19:28:34 +00:00
|
|
|
:emphasize-lines: 1, 5
|
2019-05-09 02:28:46 +00:00
|
|
|
|
2019-05-16 19:28:34 +00:00
|
|
|
from pyrogram.errors import FloodWait
|
2019-05-09 02:28:46 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
...
|
2019-05-16 19:28:34 +00:00
|
|
|
except FloodWait as e:
|
2019-05-09 02:28:46 +00:00
|
|
|
...
|
|
|
|
|
2020-04-01 18:08:46 +00:00
|
|
|
.. contents:: Contents
|
|
|
|
:backlinks: none
|
|
|
|
:local:
|
|
|
|
|
|
|
|
-----
|
|
|
|
|
2019-05-16 19:28:34 +00:00
|
|
|
303 - SeeOther
|
|
|
|
--------------
|
2019-05-13 13:57:49 +00:00
|
|
|
|
|
|
|
.. csv-table::
|
|
|
|
:file: ../../../compiler/error/source/303_SEE_OTHER.tsv
|
|
|
|
:delim: tab
|
|
|
|
:header-rows: 1
|
|
|
|
|
2019-05-16 19:28:34 +00:00
|
|
|
400 - BadRequest
|
|
|
|
----------------
|
2019-05-13 13:57:49 +00:00
|
|
|
|
|
|
|
.. csv-table::
|
|
|
|
:file: ../../../compiler/error/source/400_BAD_REQUEST.tsv
|
|
|
|
:delim: tab
|
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
401 - Unauthorized
|
|
|
|
------------------
|
|
|
|
|
|
|
|
.. csv-table::
|
|
|
|
:file: ../../../compiler/error/source/401_UNAUTHORIZED.tsv
|
|
|
|
:delim: tab
|
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
403 - Forbidden
|
|
|
|
---------------
|
|
|
|
|
|
|
|
.. csv-table::
|
|
|
|
:file: ../../../compiler/error/source/403_FORBIDDEN.tsv
|
|
|
|
:delim: tab
|
|
|
|
:header-rows: 1
|
|
|
|
|
2019-05-16 19:28:34 +00:00
|
|
|
406 - NotAcceptable
|
|
|
|
-------------------
|
2019-05-13 13:57:49 +00:00
|
|
|
|
|
|
|
.. csv-table::
|
|
|
|
:file: ../../../compiler/error/source/406_NOT_ACCEPTABLE.tsv
|
|
|
|
:delim: tab
|
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
420 - Flood
|
|
|
|
-----------
|
|
|
|
|
|
|
|
.. csv-table::
|
|
|
|
:file: ../../../compiler/error/source/420_FLOOD.tsv
|
|
|
|
:delim: tab
|
|
|
|
:header-rows: 1
|
|
|
|
|
2019-05-16 19:28:34 +00:00
|
|
|
500 - InternalServerError
|
|
|
|
-------------------------
|
2019-05-13 13:57:49 +00:00
|
|
|
|
|
|
|
.. csv-table::
|
|
|
|
:file: ../../../compiler/error/source/500_INTERNAL_SERVER_ERROR.tsv
|
|
|
|
:delim: tab
|
|
|
|
:header-rows: 1
|