Skip to content
Snippets Groups Projects

DOC: Update tutorial on error handling

Merged Florian Spreckelsen requested to merge f-doc-errors into dev
1 file
+ 42
0
Compare changes
  • Side-by-side
  • Inline
+ 42
0
@@ -102,3 +102,45 @@ Subclasses of ``EntityError`` for special purposes:
* ``AuthorizationError``
* ``AmbiguousEntityError``
BadQueryError
-------------
A ``BadQueryError`` is raised when a query couldn't be processed by
the server. In contrast to a ``TransactionError`` it is not
necessarily caused by problematic entities or
containers. ``BadQueryError`` has the two important subclasses
``EmptyUniqueQueryError`` and ``QueryNotUniqueError`` for queries with
``unique=True`` which found no or ambiguous entities, respectively.
HTTP Errors
-----------
An ``HTTPClientError`` or an ``HTTPServerError`` is raised in case of
http(s) connection problems caused by the Python client or the CaosDB
server, respectively. There are the following subclasses of
``HTTPClientError`` that are used to specify the connection problem:
* ``HTTPURITooLongError``: The URI of the request was too long to be
processed by the server.
* ``HTTPForbiddenError``: You're not allowed to access this resource.
* ``HTTPResourceNotFoundError``: The requested resource doesn't exist.
Other Errors
------------
There are further subclasses of ``CaosDBException`` that are raised in
case of faulty configurations or other problems. They should be rather
self-explanatory from their names; see the `source code
<https://docs.indiscale.com/caosdb-pylib/_apidoc/caosdb.html#module-caosdb.exceptions>`_
for further information.
* ``ConfigurationError``
* ``LoginFailedError``
* ``MismatchingEntitiesError``
* ``ServerConfigurationException``
Loading