docs: fix docs on debug mode and internal key

There were 2 problems in the docs:

1. Extensions key is always sent in error responses. The `internal` key requires debug mode.

2. Admin role errors have the `internal` key by default

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2550
GitOrigin-RevId: 4121f1ef45290896887be447a73f96b0d4e016b4
This commit is contained in:
Tirumarai Selvan 2021-10-11 14:59:51 +05:30 committed by hasura-bot
parent be1395de31
commit a27db0b658

View File

@ -190,7 +190,7 @@ The ``internal`` key contains error information including the
generated SQL statement and exception information from Postgres.
This can be highly useful, especially in the case of debugging errors in :doc:`action <../../actions/debugging>` requests.
By default the ``extensions`` key is not sent in the ``errors`` response. To enable this,
By default the ``internal`` key is not sent in the ``extensions`` response (except for ``admin`` roles). To enable this,
start the GraphQL engine server in debugging mode with the following configuration:
.. code-block:: bash
@ -201,15 +201,15 @@ start the GraphQL engine server in debugging mode with the following configurati
# flag
--dev-mode
If you want the debugging mode enabled only for ``admin`` role requests, configure as follows instead of the above:
The ``internal`` key is sent for ``admin`` role requests by default. To disable them, configure as follows:
.. code-block:: bash
# env var
HASURA_GRAPHQL_ADMIN_INTERNAL_ERRORS=true
HASURA_GRAPHQL_ADMIN_INTERNAL_ERRORS=false
# flag
--admin-internal-errors
--admin-internal-errors false
.. note::