Skip to main content

exceptions

Custom exceptions for the hub package.

Classes​

AuthenticatedUserError​

class AuthenticatedUserError(*args, **kwargs):

Error related to user authentication.

HubAuthError​

class HubAuthError(    message: str,    *,    status_code: int,    hub_message: str | None = None,    error_code: str | None = None,):

The hub did not accept the request's credentials (HTTP 401).

Create the error.

Arguments

  • message: The exception message.
  • status_code: The HTTP status the hub responded with.
  • hub_message: The hub's errorMessage, if any.
  • error_code: The hub's errorCode, if any.

Variables​

  • static default_error_code : str

HubPermissionError​

class HubPermissionError(    message: str,    *,    status_code: int,    hub_message: str | None = None,    error_code: str | None = None,):

The hub accepted the credentials but forbade the request (HTTP 403).

Create the error.

Arguments

  • message: The exception message.
  • status_code: The HTTP status the hub responded with.
  • hub_message: The hub's errorMessage, if any.
  • error_code: The hub's errorCode, if any.

Variables​

  • static default_error_code : str

HubRequestRejectedError​

class HubRequestRejectedError(    message: str,    *,    status_code: int,    hub_message: str | None = None,    error_code: str | None = None,):

The hub refused a request, so repeating it unchanged will not succeed.

Subclasses ValueError so callers that caught the ValueError raised for hub failures before this type existed still catch it.

Arguments

  • message: The exception message.
  • status_code: The HTTP status the hub responded with.
  • hub_message: The hub's errorMessage, if any.
  • error_code: The hub's errorCode, if any.

Attributes

  • status_code: The HTTP status the hub responded with.
  • hub_message: The hub's errorMessage, or None if it gave none.
  • error_code: The hub's errorCode if it gave one, else the class default.

Create the error.

Variables​

  • static default_error_code : str

ModelTooLargeError​

class ModelTooLargeError(*args, **kwargs):

The model is too large to upload to the hub.

ModelUploadError​

class ModelUploadError(*args, **kwargs):

Error occurred whilst uploading model to hub.

Ancestors​

ModelValidationError​

class ModelValidationError(*args, **kwargs):

Error occurred in validating model format.

MultiPartUploadError​

class MultiPartUploadError(*args, **kwargs):

Error occurred whilst completing multipart upload to S3.

Ancestors​

NoModelCodeError​

class NoModelCodeError(*args, **kwargs):

The model exists but no download URL was returned by the hub.

Ancestors​

PodDoesNotExistError​

class PodDoesNotExistError(*args, **kwargs):

Errors related to references to a non-existent Pod.

Ancestors​

SMARTOnFHIRError​

class SMARTOnFHIRError(*args, **kwargs):

Exception raised when interacting with SMART on FHIR system.

Ancestors​

SchemaUploadError​

class SchemaUploadError(*args, **kwargs):

Could not upload schema to hub.

Ancestors​