lce_service.errors module
- exception lce_service.errors.DatabaseExecutionError(message: str)
Bases:
ExceptionException raised when a database operation fails to execute successfully.
This error is raised when attempting to execute a database operation (such as INSERT, UPDATE, DELETE, or SELECT queries) that encounters execution failures due to database connectivity issues, constraint violations, syntax errors, or other database-level problems.
- Parameters:
message – A descriptive error message explaining what database operation failed and any relevant details about the execution error.
- exception lce_service.errors.InvalidCharacterError(message: str)
Bases:
InvalidResourceError,DatabaseExecutionErrorException raised when a value contains characters that cannot be stored in the database.
The database stores text as latin1, so values containing characters outside of latin1 are rejected. This is a user input error, so it is an InvalidResourceError, while remaining a DatabaseExecutionError for callers that handle failed database operations.
- Parameters:
message – A descriptive error message identifying the invalid character and value.
- exception lce_service.errors.InvalidResourceError(message: str)
Bases:
AttributeErrorException raised when a resource is found but contains invalid or malformed data.
This error is raised when attempting to validate a resource (such as a Dynamic Application) that exists in the database but fails validation due to invalid data, incorrect format, or constraint violations.
- Parameters:
message – A descriptive error message explaining what validation failed and any relevant details about the invalid data.
- exception lce_service.errors.MissingResourceError(message: str, matches: List[str] = None)
Bases:
LookupErrorException raised when a requested resource cannot be found.
This error is raised when attempting to retrieve a resource (such as a Dynamic Application) that does not exist in the database or is otherwise unavailable.
- Parameters:
message – A descriptive error message explaining which resource is missing and any relevant identifying information.
matches – An optional list of entity names that matched the search criteria, allowing the caller to see all potential matches and potentially refine their search to be more specific.