Skip to content

Exceptions

matchbox.common.exceptions

Custom exceptions for Matchbox.

Classes:

MatchboxArrowSchemaMismatch

MatchboxArrowSchemaMismatch(
    expected: Schema, actual: Schema
)

Bases: Exception

Arrow schema mismatch.

MatchboxClientSettingsException

MatchboxClientSettingsException(message: str | None = None)

Bases: Exception

Incorrect configuration provided to client.

MatchboxUnparsedClientRequest

MatchboxUnparsedClientRequest(message: str | None = None)

Bases: Exception

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

MatchboxUnhandledServerResponse

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

Bases: Exception

The API sent an unexpected response.

MatchboxEmptyServerResponse

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

Bases: Exception

The server returned an empty response when data was expected.

Attributes:

operation instance-attribute

operation = operation

MatchboxSourceFieldError

Bases: Exception

Specified fields diverge with the warehouse.

MatchboxSourceClientError

Bases: Exception

Location client must be set.

MatchboxSourceExtractTransformError

MatchboxSourceExtractTransformError(
    logic: str | None = None,
)

Bases: Exception

Invalid ETL logic detected.

MatchboxSourceTableError

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

Bases: Exception

Tables not found in your source data warehouse.

Attributes:

table_name instance-attribute

table_name = table_name

MatchboxServerFileError

MatchboxServerFileError(message: str | None = None)

Bases: Exception

There was a problem with file upload.

MatchboxModelConfigError

MatchboxModelConfigError(message: str | None = None)

Bases: Exception

There was a problem with ModelConfig.

MatchboxUserNotFoundError

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

Bases: Exception

User not found.

Attributes:

user_id instance-attribute

user_id = user_id

MatchboxResolutionNotFoundError

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

Bases: Exception

Resolution not found.

Attributes:

name instance-attribute

name = name

MatchboxSourceNotFoundError

MatchboxSourceNotFoundError(
    message: str = None,
    name: SourceResolutionName | None = None,
)

Bases: Exception

SourceConfig not found on the server.

Attributes:

name instance-attribute

name = name

MatchboxDataNotFound

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

Bases: Exception

Data doesn’t exist in the Matchbox source table.

Attributes:

table instance-attribute

table = table

data instance-attribute

data = data

MatchboxConnectionError

Bases: Exception

Connection to Matchbox’s backend database failed.

MatchboxDeletionNotConfirmed

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

Bases: Exception

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

MatchboxResolutionAlreadyExists

Bases: Exception

Resolution already exists.

MatchboxTooManySamplesRequested

Bases: Exception

Too many samples have been requested from the server.

MatchboxNoJudgements

Bases: Exception

No judgements found in the database when required for operation.

MatchboxDatabaseWriteError

Bases: Exception

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