Skip to content
Snippets Groups Projects
Commit 6b16b175 authored by florian's avatar florian
Browse files

ENH: Introduce bad query errors

parent 00179b2b
No related branches found
No related tags found
No related merge requests found
...@@ -141,6 +141,19 @@ class ResourceNotFoundException(ClientErrorException): ...@@ -141,6 +141,19 @@ class ResourceNotFoundException(ClientErrorException):
ClientErrorException.__init__(self, msg=msg, status=404, body=None) 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 ######################### # ######################### Transaction errors #########################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment