reviewboard.hostingsvcs.errors¶
-
exception
HostingServiceError
(message, http_code=None, help_link=None, help_link_text=None)[source]¶ Bases:
exceptions.Exception
Base class for errors related to a hosting service.
-
exception
HostingServiceAPIError
(msg=None, http_code=None, rsp=None)[source]¶ Bases:
reviewboard.hostingsvcs.errors.HostingServiceError
An API error from a hosting service.
This represents an error from the hosting service’s API. It contains the error message, HTTP code, and the parsed response payload.
HostingServiceAPIError instances can be further turned into other error types, or raised directly, if the error message is suitable for display.
-
http_code
¶ int – The HTTP code for the error.
-
rsp
¶ object – The parsed payload for the error, if available.
-
-
exception
RepositoryError
(message, http_code=None, help_link=None, help_link_text=None)[source]¶ Bases:
reviewboard.hostingsvcs.errors.HostingServiceError
An error validating, configuring or using a repository.
-
exception
TwoFactorAuthCodeRequiredError
(message, http_code=None, help_link=None, help_link_text=None)[source]¶ Bases:
reviewboard.hostingsvcs.errors.AuthorizationError
Response from a service indicating a two-factor auth code is required.
Some services will indicate, after an authorization attempt, that a two-factor authorization code must be provided to complete authorization. Services can raise this error, along with a helpful message, to inform the user and the repository form of this.
-
exception
InvalidPlanError
(plan)[source]¶ Bases:
reviewboard.hostingsvcs.errors.HostingServiceError
Indicates an invalid plan name was used.