func (c *Client) DoError(ctx context.Context, method, path string, opts *Options) (*http.Response, error) {
	res, err := c.DoReq(ctx, method, path, opts)
	if err != nil {
		return res, err
	}
	defer func() { _ = res.Body.Close() }()
	err = ResponseError(res)
	return res, err
}
// DoError is the same as DoReq(), followed by checking the response error. This
// method is meant for cases where the only information you need from the
// response is the status code. It unconditionally closes the response body.
DoError is the same as DoReq(), followed by checking the response error. This
method is meant for cases where the only information you need from the
response is the status code. It unconditionally closes the response body.
// DoError is the same as DoReq () followed by checking the response error . This // method is meant for cases where the only information you need from the // response is the status code . It unconditionally closes the response body .
func (c *Client) DoError(ctx context.Context, method, path string, opts *Options) (*http.Response, error) {
	res, err := c.DoReq(ctx, method, path, opts)
	if err != nil {
		return res, err
	}
	defer func() { _ = res.Body.Close() }()
	err = ResponseError(res)
	return res, err
}
func ( c * Client ) DoError ( ctx context . Context , method , path string , opts * Options ) ( * http . Response , error ) { res , err := c . DoReq ( ctx , method , path , opts ) if err != nil { return res , err } defer func ( ) { _ = res . Body . Close ( ) } ( ) err = ResponseError ( res ) return res , err }
DoError is the same as DoReq(), followed by checking the response error.
DoError is the same as DoReq () followed by checking the response error .