mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-01 23:05:15 +00:00
Build a much cleaner errors reference page
This commit is contained in:
@@ -1,28 +1,73 @@
|
||||
RPC Errors
|
||||
==========
|
||||
|
||||
All the Pyrogram errors listed here live inside the ``errors`` sub-package.
|
||||
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.
|
||||
|
||||
**Example:**
|
||||
**Example**:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from pyrogram.errors import RPCError
|
||||
from pyrogram.errors import InternalServerError
|
||||
|
||||
try:
|
||||
...
|
||||
except RPCError:
|
||||
except FloodWait:
|
||||
...
|
||||
|
||||
.. autoexception:: pyrogram.RPCError()
|
||||
:members:
|
||||
303 - See Other
|
||||
---------------
|
||||
|
||||
.. toctree::
|
||||
../errors/see-other
|
||||
../errors/bad-request
|
||||
../errors/unauthorized
|
||||
../errors/forbidden
|
||||
../errors/not-acceptable
|
||||
../errors/flood
|
||||
../errors/internal-server-error
|
||||
../errors/unknown-error
|
||||
.. csv-table::
|
||||
:file: ../../../compiler/error/source/303_SEE_OTHER.tsv
|
||||
:delim: tab
|
||||
:header-rows: 1
|
||||
|
||||
400 - Bad Request
|
||||
-----------------
|
||||
|
||||
.. 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
|
||||
|
||||
406 - Not Acceptable
|
||||
--------------------
|
||||
|
||||
.. 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
|
||||
|
||||
500 - Internal Server Error
|
||||
---------------------------
|
||||
|
||||
.. csv-table::
|
||||
:file: ../../../compiler/error/source/500_INTERNAL_SERVER_ERROR.tsv
|
||||
:delim: tab
|
||||
:header-rows: 1
|
||||
|
Reference in New Issue
Block a user