2022-07-21 21:07:17 +00:00
|
|
|
from typing import Union
|
2022-07-22 18:57:26 +00:00
|
|
|
|
2022-07-20 19:26:53 +00:00
|
|
|
from .base_error import BaseError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QueryRunRateLimitError(BaseError):
|
|
|
|
|
"""
|
|
|
|
|
Base class for all QueryRunRateLimitError errors.
|
|
|
|
|
"""
|
2022-07-22 18:57:26 +00:00
|
|
|
|
2022-07-20 19:26:53 +00:00
|
|
|
def __init__(self):
|
|
|
|
|
self.message = "QUERY_RUN_RATE_LIMIT_ERROR: you have exceeded the rate limit for creating/running new queries"
|
|
|
|
|
super().__init__(self.message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QueryRunTimeoutError(BaseError):
|
|
|
|
|
"""
|
|
|
|
|
Base class for all QueryRunTimeoutError errors.
|
|
|
|
|
"""
|
2022-07-22 18:57:26 +00:00
|
|
|
|
2022-07-21 21:07:17 +00:00
|
|
|
def __init__(self, timeoutMinutes: Union[int, float]):
|
2022-07-20 19:26:53 +00:00
|
|
|
self.message = f"QUERY_RUN_TIMEOUT_ERROR: your query has timed out after {timeoutMinutes} minutes."
|
|
|
|
|
super().__init__(self.message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QueryRunExecutionError(BaseError):
|
|
|
|
|
"""
|
|
|
|
|
Base class for all QueryRunExecutionError errors.
|
|
|
|
|
"""
|
2022-07-22 18:57:26 +00:00
|
|
|
|
2022-07-20 19:26:53 +00:00
|
|
|
def __init__(self):
|
|
|
|
|
self.message = "QUERY_RUN_EXECUTION_ERROR: an error has occured while executing your query."
|
|
|
|
|
super().__init__(self.message)
|