MCPcopy Create free account
hub / github.com/imroc/req / SetCommonError

Method SetCommonError

client.go:178–180  ·  view source on GitHub ↗

SetCommonError set the common result that response body will be unmarshalled to if no error occurs but Response.ResultState returns ErrorState, by default it is HTTP status `code >= 400`, you can also use SetCommonResultStateChecker to customize the result state check logic. Deprecated: Use SetComm

(err any)

Source from the content-addressed store, hash-verified

176//
177// Deprecated: Use SetCommonErrorResult instead.
178func (c *Client) SetCommonError(err any) *Client {
179 return c.SetCommonErrorResult(err)
180}
181
182// SetCommonErrorResult set the common result that response body will be unmarshalled to
183// if no error occurs but Response.ResultState returns ErrorState, by default it

Callers

nothing calls this directly

Calls 1

SetCommonErrorResultMethod · 0.95

Tested by

no test coverage detected