diff --git a/src/caosdb/exceptions.py b/src/caosdb/exceptions.py index f837cdd3ab186b03c99181b9163d94ba9088a44b..77d094c4f503f28f9bf99c85bfd020f4ed1f442b 100644 --- a/src/caosdb/exceptions.py +++ b/src/caosdb/exceptions.py @@ -141,6 +141,19 @@ class ResourceNotFoundException(ClientErrorException): ClientErrorException.__init__(self, msg=msg, status=404, body=None) +# ######################### Bad query errors ########################### + +class BadQueryError(CaosDBException): + """Base class for query errors that are not transaction errors.""" + + +class QueryNotUniqueError(BadQueryError): + """A unique query or retrieve found more than one entity.""" + + +class EmptyUniqueQueryError(BadQueryError): + """A unique query or retrieve dound no result.""" + # ######################### Transaction errors #########################