diff --git a/docs/stdlib/cfg.rst b/docs/stdlib/cfg.rst index 31d98124bab..158d7da0dc8 100644 --- a/docs/stdlib/cfg.rst +++ b/docs/stdlib/cfg.rst @@ -116,6 +116,28 @@ Query behavior UI session, so you won't have to remember to re-enable it when you're done. +:eql:synopsis:`force_database_error -> str` + A hook to force all queries to produce an error. Defaults to 'false'. + + .. note:: + + This parameter takes a ``str`` instead of a ``bool`` to allow more + verbose messages when all queries are forced to fail. The database will + attempt to deserialize this ``str`` into a JSON object that must include + a ``type`` (which must be an EdgeDB error type name), and may also + include ``message``, ``hint``, and ``details`` which can be set ad-hoc + by the user. + + For example, the following is valid input: + + ``'{ "type": "QueryError", + "message": "Did not work", + "hint": "Try doing something else", + "details": "Indeed, something went really wrong" }'`` + + As is this: + + ``'{ "type": "UnknownParameterError" }'`` .. _ref_std_cfg_client_connections: