()
| 32 | type StatusCodeError int |
| 33 | |
| 34 | func (err StatusCodeError) Error() string { |
| 35 | return fmt.Sprintf("server returned %d %s", err, http.StatusText(int(err))) |
| 36 | } |
| 37 | |
| 38 | // IsStatusCodeError returns true if the given error is of type StatusCodeError. |
| 39 | func IsStatusCodeError(err error) bool { |
no outgoing calls