Exceptions

Exceptions raised by the v2 client.

All exceptions inherit from FlowApiError, which carries the HTTP status code and error message from the response.

exception flowbio.v2.exceptions.FlowApiError(status_code, message)

Bases: Exception

Base exception for all Flow API errors.

Raised when the API returns a non-success HTTP response. Carries the status code and error message from the response body.

Parameters:
  • status_code (int) – The HTTP status code from the response.

  • message (str | dict[str, list[str]]) – The error message — either a string or a dict of field-level errors (e.g. {"field": ["error message"]}).

exception flowbio.v2.exceptions.AuthenticationError(status_code, message)

Bases: FlowApiError

Raised when the API returns a 401 Unauthorized response.

exception flowbio.v2.exceptions.BadRequestError(status_code, message)

Bases: FlowApiError

Raised when the API returns a 400 Bad Request response.

exception flowbio.v2.exceptions.AnnotationValidationError(errors)

Bases: BadRequestError

Raised when the annotation upload in upload_multiplexed_data() returns hard validation errors, or when annotation upload is told not to ignore warnings.

The annotation endpoint returns {"validation": [...]} with status 400 for errors that cannot be ignored (as opposed to warnings which can, unless they are not configured to be ignored).

Parameters:

errors (list[dict]) – List of validation error dicts from the response.

exception flowbio.v2.exceptions.NotFoundError(status_code, message)

Bases: FlowApiError

Raised when the API returns a 404 Not Found response.