Skip to content

Exceptions

matchbox.common.exceptions

Custom exceptions for Matchbox.

Classes:

MatchboxException

MatchboxException(message: str | None = None)

Bases: Exception

An exception has occurred in Matchbox..

MatchboxNameError

MatchboxNameError(message: str)

Bases: MatchboxException, ValueError

Name did not pass validation.

MatchboxArrowSchemaMismatch

MatchboxArrowSchemaMismatch(expected: Schema, actual: Schema)

Bases: MatchboxException

Arrow schema mismatch.

MatchboxClientSettingsException

MatchboxClientSettingsException(message: str | None = None)

Bases: MatchboxException

Incorrect configuration provided to client.

MatchboxUnparsedClientRequest

MatchboxUnparsedClientRequest(message: str | None = None)

Bases: MatchboxException

The API could not parse the content of the client request.

MatchboxUnhandledServerResponse

MatchboxUnhandledServerResponse(http_status: int, details: str | None = None)

Bases: MatchboxException

The API sent an unexpected response.

MatchboxEmptyServerResponse

MatchboxEmptyServerResponse(message: str | None = None, operation: str | None = None)

Bases: MatchboxException

The server returned an empty response when data was expected.

Attributes:

operation instance-attribute

operation = operation

MatchboxSourceFieldError

MatchboxSourceFieldError(message: str | None = None)

Bases: MatchboxException

Specified fields diverge with the warehouse.

MatchboxSourceClientError

MatchboxSourceClientError(message: str | None = None)

Bases: MatchboxException

Location client must be set.

MatchboxSourceExtractTransformError

MatchboxSourceExtractTransformError(logic: str | None = None)

Bases: MatchboxException

Invalid ETL logic detected.

MatchboxSourceTableError

MatchboxSourceTableError(message: str | None = None, table_name: str | None = None)

Bases: MatchboxException

Tables not found in your source data warehouse.

Attributes:

table_name instance-attribute

table_name = table_name

MatchboxServerFileError

MatchboxServerFileError(message: str | None = None)

Bases: MatchboxException

There was a problem with file upload.

MatchboxModelConfigError

MatchboxModelConfigError(message: str | None = None)

Bases: MatchboxException

There was a problem with ModelConfig.

MatchboxUserNotFoundError

MatchboxUserNotFoundError(message: str | None = None, user_id: str | None = None)

Bases: MatchboxException

User not found.

Attributes:

user_id instance-attribute

user_id = user_id

MatchboxResolutionNotFoundError

MatchboxResolutionNotFoundError(message: str | None = None, name: ResolutionName | None = None)

Bases: MatchboxException

Resolution not found.

Attributes:

name instance-attribute

name = name

MatchboxCollectionNotFoundError

MatchboxCollectionNotFoundError(message: str | None = None, name: CollectionName | None = None)

Bases: MatchboxException

Collection not found.

Attributes:

name instance-attribute

name = name

MatchboxRunNotFoundError

MatchboxRunNotFoundError(message: str | None = None, run_id: RunID | None = None)

Bases: MatchboxException

Run not found.

Attributes:

run_id instance-attribute

run_id = run_id

MatchboxDataNotFound

MatchboxDataNotFound(message: str | None = None, table: str | None = None, data: Any | None = None)

Bases: MatchboxException

Data doesn’t exist in the Matchbox source table.

Attributes:

table instance-attribute

table = table

data instance-attribute

data = data

MatchboxConnectionError

MatchboxConnectionError(message: str | None = None)

Bases: MatchboxException

Connection to Matchbox’s backend database failed.

MatchboxDeletionNotConfirmed

MatchboxDeletionNotConfirmed(message: str | None = None, children: list[str | int] | None = None)

Bases: MatchboxException

Deletion must be confirmed: if certain, rerun with certain=True.

MatchboxResolutionAlreadyExists

MatchboxResolutionAlreadyExists(message: str | None = None)

Bases: MatchboxException

Resolution already exists.

MatchboxCollectionAlreadyExists

MatchboxCollectionAlreadyExists(message: str | None = None)

Bases: MatchboxException

Collection already exists.

MatchboxRunAlreadyExists

MatchboxRunAlreadyExists(message: str | None = None)

Bases: MatchboxException

Run already exists.

MatchboxRunNotWriteable

MatchboxRunNotWriteable(message: str | None = None)

Bases: MatchboxException

Run is not mutable.

MatchboxTooManySamplesRequested

MatchboxTooManySamplesRequested(message: str | None = None)

Bases: MatchboxException

Too many samples have been requested from the server.

MatchboxNoJudgements

MatchboxNoJudgements(message: str | None = None)

Bases: MatchboxException

No judgements found in the database when required for operation.

MatchboxDatabaseWriteError

MatchboxDatabaseWriteError(message: str | None = None)

Bases: MatchboxException

Could not be written to the backend DB, likely due to a constraint violation.