RepertoireWebError#

exception rubin.repertoire.RepertoireWebError(message, *, method=None, url=None, status=None, body=None)#

Bases: RepertoireError

Exception arising from an HTTP request failure.

Parameters:
  • message (str) – Exception string value.

  • method (str | None, default: None) – Method of request.

  • url (str | None, default: None) – URL of the request.

  • status (int | None, default: None) – Status code of failure, if any.

  • body (str | None, default: None) – Body of failure message, if any.

method#

Method of failing request, if available.

url#

URL of failing request, if available.

status#

HTTP status of failing request, if available.

body#

Body of error message from server, if available.

classmethod from_exception(exc)#

Create an exception from an HTTPX exception.

Parameters:

exc (HTTPError) – Exception from HTTPX.

Returns:

Newly-constructed exception.

Return type:

RepertoireWebError