NewTestError is a helper function to create a Error, setting the internal fields. It's generally only useful for testing.
(statusCode int, method string, u string)
| 539 | // NewTestError is a helper function to create a Error, setting the internal fields. It's generally only useful for |
| 540 | // testing. |
| 541 | func NewTestError(statusCode int, method string, u string) *Error { |
| 542 | return &Error{ |
| 543 | statusCode: statusCode, |
| 544 | method: method, |
| 545 | url: u, |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | // NewError creates a new Error with the response and status code. |
| 550 | func NewError(statusCode int, response Response) *Error { |
no outgoing calls