HttpResponseError 類別

已提出要求,且從服務收到非成功狀態碼。

繼承
HttpResponseError

建構函式

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

參數

message
object
預設值: None

字串化為 'message' 屬性的訊息物件

response
HttpResponseAsyncHttpResponse
預設值: None

觸發例外狀況的回應。

變數

reason
str

HTTP 回應原因

status_code
int

HttpResponse 的狀態碼

response
HttpResponseAsyncHttpResponse

觸發例外狀況的回應。

model
<xref:msrest.serialization.Model>

要求本文/回應本文模型

error
ODataV4Format

格式化的錯誤

方法

add_note

Exception.add_note (附注) – 將附注新增至例外狀況

raise_with_traceback

使用現有的追蹤引發例外狀況。

自 1.22.0 版起已被取代:此方法已被取代,因為我們不再支援 Python 2。 請改用 raise/from。

with_traceback

Exception.with_traceback (tb) – 自行設定。traceback to tb and return self.

add_note

Exception.add_note (附注) – 將附注新增至例外狀況

add_note()

raise_with_traceback

使用現有的追蹤引發例外狀況。

自 1.22.0 版起已被取代:此方法已被取代,因為我們不再支援 Python 2。 請改用 raise/from。

raise_with_traceback() -> None

with_traceback

Exception.with_traceback (tb) – 自行設定。traceback to tb and return self.

with_traceback()

屬性

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