Error returns a string representation of the OAuth error.
()
| 20 | |
| 21 | // Error returns a string representation of the OAuth error. |
| 22 | func (e *OAuthError) Error() string { |
| 23 | if e.Description != "" { |
| 24 | return fmt.Sprintf("OAuth error %s: %s", e.Code, e.Description) |
| 25 | } |
| 26 | return fmt.Sprintf("OAuth error: %s", e.Code) |
| 27 | } |
| 28 | |
| 29 | // NewOAuthError creates a new OAuth error with the specified code, description, and status code. |
| 30 | func NewOAuthError(code, description string, statusCode int) *OAuthError { |
no outgoing calls