SetErrorResult set the result that response body will be unmarshalled to if no error occurs and Response.ResultState() returns ErrorState, by default it requires HTTP status `code >= 400`, you can also use Client.SetResultStateCheckFunc to customize the result state check logic.
(err any)
| 430 | // it requires HTTP status `code >= 400`, you can also |
| 431 | // use Client.SetResultStateCheckFunc to customize the result state check logic. |
| 432 | func (r *Request) SetErrorResult(err any) *Request { |
| 433 | if err == nil { |
| 434 | return r |
| 435 | } |
| 436 | r.Error = util.GetPointer(err) |
| 437 | return r |
| 438 | } |
| 439 | |
| 440 | // SetBearerAuthToken set bearer auth token for the request. |
| 441 | func (r *Request) SetBearerAuthToken(token string) *Request { |