提交 3900b8f0 编写于 作者: J Jingwen Owen Ou

Revert "Add error formatting to authentication"

This reverts commit 26540bba.
上级 26540bba
......@@ -309,7 +309,7 @@ func (client *Client) FindOrCreateToken(user, password, twoFactorCode string) (t
auths, result := authsService.All()
if result.HasError() {
err = &ClientError{formatError("authenticating user", result)}
err = &ClientError{result.Err}
return
}
......@@ -328,7 +328,7 @@ func (client *Client) FindOrCreateToken(user, password, twoFactorCode string) (t
auth, result := authsService.Create(authParam)
if result.HasError() {
err = &ClientError{formatError("authenticating user", result)}
err = &ClientError{result.Err}
return
}
......@@ -426,7 +426,7 @@ func formatError(action string, result *octokit.Result) error {
errStr = fmt.Sprintf("%s\n%s", errStr, strings.Join(messages, "\n"))
}
return fmt.Errorf(strings.TrimSpace(errStr))
return fmt.Errorf(errStr)
}
return result.Err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册