diff --git a/docs/errors.rst b/docs/errors.rst index e4bc89000..2a5831c21 100644 --- a/docs/errors.rst +++ b/docs/errors.rst @@ -3,7 +3,7 @@ Error Source ============ -For the most part, error messages will come directly from the database with the same `structure that PostgreSQL uses `_. PostgREST will convert the ``MESSAGE``, ``DETAIL``, ``HINT`` and ``ERRCODE`` from the PostgreSQL error to JSON format and add an HTTP status code to the response (see :ref:`status_codes`). For instance, this is the error you will get when querying a nonexistent table: +For the most part, error messages will come directly from the database with the same `structure that PostgreSQL uses `_. PostgREST will convert the ``MESSAGE``, ``DETAIL``, ``HINT`` and ``ERRCODE`` from the PostgreSQL error to JSON and add an HTTP status code to the response. For instance, when querying a nonexistent table: .. code-block:: http @@ -23,7 +23,7 @@ For the most part, error messages will come directly from the database with the "message": "relation \"api.nonexistent_table\" does not exist" } -However, some errors do come from PostgREST itself (such as those related to the :doc:`Schema Cache `). These have the same structure as the PostgreSQL errors but are differentiated by the ``PGRST`` prefix in the ``code`` field (see :ref:`pgrst_errors`). For instance, when querying a function that does not exist, the error will be: +However, some errors do come from PostgREST itself (such as those related to the :doc:`Schema Cache `). These have the same structure as the PostgreSQL errors but are differentiated by the ``PGRST`` prefix in the ``code`` field. For instance, when querying a function that does not exist: .. code-block:: http @@ -116,7 +116,11 @@ PostgREST translates `PostgreSQL error codes ` | -| PGRST002 | | due to the PostgreSQL service not running. | +| PGRST002 | | due to the PostgreSQL service not running. | +---------------+-------------+-------------------------------------------------------------+ | .. _pgrst003: | 504 | The request timed out waiting for a pool connection | | | | to be available. See :ref:`db-pool-acquisition-timeout`. |