HttpResponseError Class

A request was made, and a non-success status code was received from the service.

Inheritance
HttpResponseError

Constructor

HttpResponseError(message: object | None = None, response: _HttpResponseCommonAPI | None = None, **kwargs: Any)

Parameters

Name Description
message

The message object stringified as 'message' attribute

default value: None
response

The response that triggered the exception.

default value: None

Variables

Name Description
reason
str

The HTTP response reason

status_code
int

HttpResponse's status code

response

The response that triggered the exception.

model
<xref:msrest.serialization.Model>

The request body/response body model

error

The formatted error

Methods

add_note

Exception.add_note(note) – add a note to the exception

raise_with_traceback

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don't support Python 2 anymore. Use raise/from instead.

with_traceback

Exception.with_traceback(tb) – set self.traceback to tb and return self.

add_note

Exception.add_note(note) – add a note to the exception

add_note()

raise_with_traceback

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don't support Python 2 anymore. Use raise/from instead.

raise_with_traceback() -> None

with_traceback

Exception.with_traceback(tb) – set self.traceback to tb and return self.

with_traceback()

Attributes

args

continuation_token

continuation_token: str | None

exc_msg

exc_msg: str

exc_traceback

exc_traceback: TracebackType | None

exc_type

exc_type: Type[Any] | None

exc_value

exc_value: BaseException | None

inner_exception

inner_exception: BaseException | None

message

message: str