Skip to content

Exceptions

webex_byova.exceptions.WebexBYOVAError

Bases: Exception

Base exception for all SDK errors.

Attributes:

Name Type Description
status_code

HTTP status code from the Webex API, if applicable.

body

Raw response body from the Webex API, if available.

status_code instance-attribute

status_code = status_code

body instance-attribute

body = body

__init__

__init__(message: str, *, status_code: int | None = None, body: Any = None) -> None

Initialize the exception.

Parameters:

Name Type Description Default
message str

Human-readable error description.

required
status_code int | None

HTTP status code from the failed request.

None
body Any

Parsed or raw response body from the failed request.

None

webex_byova.exceptions.AuthenticationError

Bases: WebexBYOVAError

Raised when authentication fails (HTTP 401 or 403).

webex_byova.exceptions.NotFoundError

Bases: WebexBYOVAError

Raised when a requested resource is not found (HTTP 404).

webex_byova.exceptions.ValidationError

Bases: WebexBYOVAError

Raised when a request is invalid (HTTP 400, 409, or 415).

webex_byova.exceptions.RateLimitError

Bases: WebexBYOVAError

Raised when the Webex API rate limit is exceeded (HTTP 429).

Attributes:

Name Type Description
retry_after

Seconds to wait before retrying, from the Retry-After header.

retry_after instance-attribute

retry_after = retry_after

__init__

__init__(message: str, *, status_code: int | None = 429, body: Any = None, retry_after: int | None = None) -> None

Initialize the rate limit exception.

Parameters:

Name Type Description Default
message str

Human-readable error description.

required
status_code int | None

HTTP status code (defaults to 429).

429
body Any

Raw response body from the failed request.

None
retry_after int | None

Recommended retry delay in seconds.

None

webex_byova.exceptions.OAuthRedirectError

Bases: WebexBYOVAError

Raised when the OAuth redirect fails or the user denies access.

webex_byova.exceptions.OAuthRedirectTimeout

Bases: WebexBYOVAError

Raised when the local OAuth redirect listener times out.

webex_byova.exceptions.OrgNotRegisteredError

Bases: WebexBYOVAError

Raised when no Service App tokens exist for the requested organization.

Media server

Media server exceptions live under webex_byova.media.exceptions and require pip install webex-byova[media]. See webex_byova.media and Error Handling.