Skip to content

Commit

Permalink
add statusCode for error
Browse files Browse the repository at this point in the history
  • Loading branch information
yndu13 authored and peze committed Apr 11, 2022
1 parent c8b881c commit ad02a10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ func (client *Client) DoRequest(params *Params, request *OpenApiRequest, runtime
err = util.AssertAsMap(_res)
}

err["statusCode"] = response_.StatusCode
_err = tea.NewSDKError(map[string]interface{}{
"code": tea.ToString(DefaultAny(err["Code"], err["code"])),
"message": "code: " + tea.ToString(tea.IntValue(response_.StatusCode)) + ", " + tea.ToString(DefaultAny(err["Message"], err["message"])) + " request id: " + tea.ToString(DefaultAny(err["RequestId"], err["requestId"])),
Expand Down

0 comments on commit ad02a10

Please sign in to comment.