Exceptions
matchbox.common.exceptions
¶
Custom exceptions for Matchbox.
Classes:
-
MatchboxException–An exception has occurred in Matchbox..
-
MatchboxHttpException–Base class for exceptions that can be transmitted over HTTP.
-
MatchboxNameError–Name did not pass validation.
-
MatchboxArrowSchemaMismatch–Arrow schema mismatch.
-
MatchboxClientSettingsException–Incorrect configuration provided to client.
-
MatchboxUnparsedClientRequest–The API could not parse the content of the client request.
-
MatchboxUnhandledServerResponse–The API sent an unexpected response.
-
MatchboxEmptyServerResponse–The server returned an empty response when data was expected.
-
MatchboxSourceFieldError–Specified fields diverge with the warehouse.
-
MatchboxSourceClientError–Location client must be set.
-
MatchboxSourceExtractTransformError–Invalid ETL logic detected.
-
MatchboxSourceTableError–Tables not found in your source data warehouse.
-
MatchboxServerFileError–There was a problem with file upload.
-
MatchboxAuthenticationError–Authentication failed.
-
MatchboxPermissionDenied–User lacks required permission for the requested resource.
-
MatchboxUserNotFoundError–User not found.
-
MatchboxResolutionNotFoundError–Resolution not found.
-
MatchboxCollectionNotFoundError–Collection not found.
-
MatchboxRunNotFoundError–Run not found.
-
MatchboxDataNotFound–Data doesn’t exist in the Matchbox source table.
-
MatchboxConnectionError–Connection to Matchbox’s backend database failed.
-
MatchboxPermissionDeniedError–Raised when a user lacks permission for an action.
-
MatchboxDeletionNotConfirmed–Deletion must be confirmed: if certain, rerun with certain=True.
-
MatchboxResolutionAlreadyExists–Resolution already exists.
-
MatchboxResolutionUpdateError–Resolution metadata cannot be updated.
-
MatchboxResolutionInvalidData–Resolution data does not match fingerprint.
-
MatchboxResolutionExistingData–Data was already set on resolution.
-
MatchboxResolutionNotQueriable–The resolution is not ready to be queried.
-
MatchboxCollectionAlreadyExists–Collection already exists.
-
MatchboxRunAlreadyExists–Run already exists.
-
MatchboxRunNotWriteable–Run is not mutable.
-
MatchboxTooManySamplesRequested–Too many samples have been requested from the server.
-
MatchboxGroupNotFoundError–Raised when a group is not found.
-
MatchboxGroupAlreadyExistsError–Raised when attempting to create a group that already exists.
-
MatchboxSystemGroupError–Raised when attempting to modify or delete a system group.
-
MatchboxNoJudgements–No judgements found in the database when required for operation.
-
MatchboxDatabaseWriteError–Could not be written to the backend DB, likely due to a constraint violation.
-
MatchboxLockError–Trying to modify locked data.
Attributes:
HTTP_EXCEPTION_REGISTRY
module-attribute
¶
HTTP_EXCEPTION_REGISTRY: dict[str, type[MatchboxHttpException]] = {(__name__): _67for exc in (_get_all_subclasses(MatchboxHttpException))}
MatchboxExceptionType
module-attribute
¶
MatchboxExceptionType = StrEnum('MatchboxExceptionType', _enum_members)
MatchboxException
¶
MatchboxException(message: str | None = None)
Bases: Exception
An exception has occurred in Matchbox..
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxHttpException
¶
MatchboxHttpException(message: str | None = None)
Bases: MatchboxException
Base class for exceptions that can be transmitted over HTTP.
Subclasses must define http_status as a class attribute.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxNameError
¶
MatchboxNameError(message: str)
Bases: MatchboxException, ValueError
Name did not pass validation.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxArrowSchemaMismatch
¶
Bases: MatchboxException
Arrow schema mismatch.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxClientSettingsException
¶
MatchboxClientSettingsException(message: str | None = None)
Bases: MatchboxException
Incorrect configuration provided to client.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxUnparsedClientRequest
¶
MatchboxUnparsedClientRequest(message: str | None = None)
Bases: MatchboxException
The API could not parse the content of the client request.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxUnhandledServerResponse
¶
Bases: MatchboxException
The API sent an unexpected response.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxEmptyServerResponse
¶
Bases: MatchboxException
The server returned an empty response when data was expected.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxSourceFieldError
¶
MatchboxSourceFieldError(message: str | None = None)
Bases: MatchboxException
Specified fields diverge with the warehouse.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxSourceClientError
¶
MatchboxSourceClientError(message: str | None = None)
Bases: MatchboxException
Location client must be set.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxSourceExtractTransformError
¶
MatchboxSourceExtractTransformError(logic: str | None = None)
Bases: MatchboxException
Invalid ETL logic detected.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxSourceTableError
¶
Bases: MatchboxException
Tables not found in your source data warehouse.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxServerFileError
¶
MatchboxServerFileError(message: str | None = None)
Bases: MatchboxHttpException
There was a problem with file upload.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxAuthenticationError
¶
MatchboxAuthenticationError(message: str | None = None)
Bases: MatchboxHttpException
Authentication failed.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxPermissionDenied
¶
MatchboxPermissionDenied(message: str | None = None, permission: PermissionType | None = None, resource_type: BackendResourceType | None = None, resource_name: str | None = None)
Bases: MatchboxHttpException
User lacks required permission for the requested resource.
Methods:
-
to_details–Return permission, resource_type and resource_name if set.
Attributes:
MatchboxUserNotFoundError
¶
Bases: MatchboxHttpException
User not found.
Methods:
-
to_details–Return user_name if set.
Attributes:
-
http_status– -
user_name–
MatchboxResolutionNotFoundError
¶
MatchboxResolutionNotFoundError(message: str | None = None, name: ResolutionName | None = None)
Bases: MatchboxHttpException
Resolution not found.
Methods:
-
to_details–Return name if set.
Attributes:
-
http_status– -
name–
MatchboxCollectionNotFoundError
¶
MatchboxCollectionNotFoundError(message: str | None = None, name: CollectionName | None = None)
Bases: MatchboxHttpException
Collection not found.
Methods:
-
to_details–Return name if set.
Attributes:
-
http_status– -
name–
MatchboxRunNotFoundError
¶
Bases: MatchboxHttpException
Run not found.
Methods:
-
to_details–Return run_id if set.
Attributes:
-
http_status– -
run_id–
MatchboxDataNotFound
¶
MatchboxDataNotFound(message: str | None = None, table: str | None = None, data: list[Any] | None = None)
Bases: MatchboxHttpException
Data doesn’t exist in the Matchbox source table.
Methods:
-
to_details–Return table and data if set.
Attributes:
-
http_status– -
table– -
data–
MatchboxConnectionError
¶
MatchboxConnectionError(message: str | None = None)
Bases: MatchboxException
Connection to Matchbox’s backend database failed.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxPermissionDeniedError
¶
MatchboxPermissionDeniedError(message: str | None = None)
Bases: MatchboxHttpException
Raised when a user lacks permission for an action.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxDeletionNotConfirmed
¶
Bases: MatchboxHttpException
Deletion must be confirmed: if certain, rerun with certain=True.
Methods:
-
to_details–Return children if set.
Attributes:
-
http_status– -
children–
MatchboxResolutionAlreadyExists
¶
MatchboxResolutionAlreadyExists(message: str | None = None)
Bases: MatchboxHttpException
Resolution already exists.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxResolutionUpdateError
¶
MatchboxResolutionUpdateError(message: str | None = None)
Bases: MatchboxHttpException
Resolution metadata cannot be updated.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxResolutionInvalidData
¶
MatchboxResolutionInvalidData(message: str | None = None)
Bases: MatchboxHttpException
Resolution data does not match fingerprint.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxResolutionExistingData
¶
MatchboxResolutionExistingData(message: str | None = None)
Bases: MatchboxHttpException
Data was already set on resolution.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxResolutionNotQueriable
¶
MatchboxResolutionNotQueriable(message: str | None = None)
Bases: MatchboxHttpException
The resolution is not ready to be queried.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxCollectionAlreadyExists
¶
MatchboxCollectionAlreadyExists(message: str | None = None)
Bases: MatchboxHttpException
Collection already exists.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxRunAlreadyExists
¶
MatchboxRunAlreadyExists(message: str | None = None)
Bases: MatchboxHttpException
Run already exists.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxRunNotWriteable
¶
MatchboxRunNotWriteable(message: str | None = None)
Bases: MatchboxHttpException
Run is not mutable.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxTooManySamplesRequested
¶
MatchboxTooManySamplesRequested(message: str | None = None)
Bases: MatchboxHttpException
Too many samples have been requested from the server.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxGroupNotFoundError
¶
MatchboxGroupNotFoundError(message: str | None = None)
Bases: MatchboxHttpException
Raised when a group is not found.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxGroupAlreadyExistsError
¶
MatchboxGroupAlreadyExistsError(message: str | None = None)
Bases: MatchboxHttpException
Raised when attempting to create a group that already exists.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxSystemGroupError
¶
MatchboxSystemGroupError(message: str | None = None)
Bases: MatchboxHttpException
Raised when attempting to modify or delete a system group.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxNoJudgements
¶
MatchboxNoJudgements(message: str | None = None)
Bases: MatchboxHttpException
No judgements found in the database when required for operation.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes:
MatchboxDatabaseWriteError
¶
MatchboxDatabaseWriteError(message: str | None = None)
Bases: MatchboxException
Could not be written to the backend DB, likely due to a constraint violation.
Methods:
-
to_details–Return exception-specific details for serialisation.
MatchboxLockError
¶
MatchboxLockError(message: str | None = None)
Bases: MatchboxHttpException
Trying to modify locked data.
Methods:
-
to_details–Return exception-specific details for serialisation.
Attributes: