MTPyroger/docs/source/api/errors.rst

79 lines
1.5 KiB
ReStructuredText
Raw Normal View History

2019-05-12 17:26:55 +00:00
RPC Errors
==========
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.
.. code-block:: python
2019-05-16 19:28:34 +00:00
:emphasize-lines: 1, 5
2019-05-16 19:28:34 +00:00
from pyrogram.errors import FloodWait
try:
...
2019-05-16 19:28:34 +00:00
except FloodWait as e:
...
2020-04-01 18:08:46 +00:00
.. contents:: Contents
:backlinks: none
:local:
-----
2019-05-16 19:28:34 +00:00
303 - SeeOther
--------------
.. 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
----------------
.. 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
-------------------
.. 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
-------------------------
.. csv-table::
:file: ../../../compiler/error/source/500_INTERNAL_SERVER_ERROR.tsv
:delim: tab
:header-rows: 1