Created Queries and Execute endpoint
This commit is contained in:
@@ -17,3 +17,33 @@ class UserNotFound(HTTPException):
|
||||
headers=None,
|
||||
):
|
||||
super().__init__(status_code, detail, headers)
|
||||
|
||||
|
||||
class QueryValidationError(ValueError):
|
||||
def __init__(self, loc: list[str], msg: str):
|
||||
self.loc = loc
|
||||
self.msg = msg
|
||||
super().__init__(msg)
|
||||
|
||||
class QueryNotFound(HTTPException):
|
||||
def __init__(self, status_code=404, detail = {
|
||||
'message': "The referenced query was not found.",
|
||||
"code": 'query-not-found'
|
||||
}, headers = None):
|
||||
super().__init__(status_code, detail, headers)
|
||||
|
||||
|
||||
class ConnectionNotFound(HTTPException):
|
||||
def __init__(self, status_code=404, detail = {
|
||||
'message': "The referenced connection was not found.",
|
||||
"code": 'connection-not-found'
|
||||
}, headers = None):
|
||||
super().__init__(status_code, detail, headers)
|
||||
|
||||
|
||||
class PoolNotFound(HTTPException):
|
||||
def __init__(self, status_code=404, detail = {
|
||||
'message': "We didn't find a running Pool for the referenced connection.",
|
||||
"code": 'pool-not-found'
|
||||
}, headers = None):
|
||||
super().__init__(status_code, detail, headers)
|
||||
Reference in New Issue
Block a user