Share via


HttpResponseError Klasse

Es wurde eine Anforderung gestellt, und es wurde eine nicht erfolgreiche status Code vom Dienst empfangen.

Vererbung
HttpResponseError

Konstruktor

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

Parameter

message
object
Standardwert: None

Das Nachrichtenobjekt, das als "Message"-Attribut zeichenfolgenifiziert wurde

response
HttpResponse oder AsyncHttpResponse
Standardwert: None

Die Antwort, die die Ausnahme ausgelöst hat.

Variablen

reason
str

Grund für die HTTP-Antwort

status_code
int

HttpResponse's status Code

response
HttpResponse oder AsyncHttpResponse

Die Antwort, die die Ausnahme ausgelöst hat.

model
<xref:msrest.serialization.Model>

Das Anforderungstext-/Antwortkörpermodell

error
ODataV4Format

Der formatierte Fehler

Methoden

add_note

Exception.add_note(Hinweis) – Fügen Sie der Ausnahme eine Notiz hinzu.

raise_with_traceback

Lösen Sie die Ausnahme mit der vorhandenen Rückverfolgung aus.

Seit Version 1.22.0 veraltet: Diese Methode ist veraltet, da Python 2 nicht mehr unterstützt wird. Verwenden Sie stattdessen raise/from.

with_traceback

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

add_note

Exception.add_note(Hinweis) – Fügen Sie der Ausnahme eine Notiz hinzu.

add_note()

raise_with_traceback

Lösen Sie die Ausnahme mit der vorhandenen Rückverfolgung aus.

Seit Version 1.22.0 veraltet: Diese Methode ist veraltet, da Python 2 nicht mehr unterstützt wird. Verwenden Sie stattdessen raise/from.

raise_with_traceback() -> None

with_traceback

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

with_traceback()

Attribute

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