diff --git a/client/client.go b/client/client.go index 5d538b2..76d921b 100644 --- a/client/client.go +++ b/client/client.go @@ -410,13 +410,13 @@ func (client *Client) DoRequest(action *string, protocol *string, method *string return _result, _err } res := util.AssertAsMap(obj) + res["_headers"] = response_.Headers if tea.BoolValue(util.Is4xx(response_.StatusCode)) || tea.BoolValue(util.Is5xx(response_.StatusCode)) { _err = tea.NewSDKError(map[string]interface{}{ "code": tea.ToString(DefaultAny(res["Code"], res["code"])), "statusCode": tea.IntValue(response_.StatusCode), "message": "code: " + tea.ToString(tea.IntValue(response_.StatusCode)) + ", " + tea.ToString(DefaultAny(res["Message"], res["message"])) + " request id: " + tea.ToString(DefaultAny(res["RequestId"], res["requestId"])), "data": res, - "_headers": response_.Headers, }) return _result, _err }