7.1.2.2. citrine.exceptions module
Citrine-specific exceptions.
- exception citrine.exceptions.BadRequest(path: str, response: Response | None = None)
Bases:
NonRetryableHttpException
The user is trying to perform an invalid operation. (http status 400).
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.CitrineException
Bases:
Exception
The base exception class for Citrine-Python exceptions.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- citrine.exceptions.Conflict
alias of
WorkflowConflictException
- exception citrine.exceptions.JobFailureError(*, message: str, job_id: UUID, failure_reasons: List[str])
Bases:
NonRetryableException
The asynchronous job completed with the given failure message.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.ModuleRegistrationFailedException(moduleType: str, exc: Exception)
Bases:
NonRetryableException
A module failed to register.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.NonRetryableException
Bases:
CitrineException
Indicates that a non-retryable error occurred.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.NonRetryableHttpException(path: str, response: Response | None = None)
Bases:
NonRetryableException
An exception originating from an HTTP error from a Citrine API.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.NotFound(path: str, response: Response | None = None)
Bases:
NonRetryableHttpException
A particular url was not found. (http status 404).
- static build(*, message: str, method: str, path: str, params: dict = {})
Construct a NotFound response from parameters.
This allows raising NotFound locally to produce consistent behavior even if the server doesn’t return a 404.
- Parameters:
message (str) – The text of the exception message, which will be surrounded by more details.
method (str) – The HTTP method which resulted in the error, to display in the full message.
path (str) – The path from which the error came, to display in the full message
params (dict) – The query parameters passed as part of the request, to display in the full message.
- Returns:
The NotFound exception corresponding to the above arguments.
- Return type:
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.PollingTimeoutError
Bases:
NonRetryableException
Polling for an asynchronous result has exceeded the timeout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.RetryableException
Bases:
CitrineException
Indicates an error occurred but it is retryable.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.Unauthorized(path: str, response: Response | None = None)
Bases:
NonRetryableHttpException
The user is unauthorized to make this api call. (http status 401).
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.UnauthorizedRefreshToken
Bases:
NonRetryableException
The token used to refresh authentication is invalid.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.WorkflowConflictException(path: str, response: Response | None = None)
Bases:
NonRetryableHttpException
There is a conflict preventing the workflow from being executed. (http status 409).
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args
- exception citrine.exceptions.WorkflowNotReadyException
Bases:
RetryableException
The workflow is not ready to be executed. I.e., still validating. (http status 425).
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args