mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-11 05:10:50 +00:00
Backport #28796 by @wxiaoguang `resp != nil` doesn't mean the request really succeeded. Add a comment for requestJSONResp to clarify the behavior. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ func SendEmail(ctx context.Context, subject, message string, to []string) (strin
|
||||
})
|
||||
|
||||
resp, extra := requestJSONResp(req, &responseText{})
|
||||
if resp == nil {
|
||||
if extra.HasError() {
|
||||
return "", extra
|
||||
}
|
||||
return resp.Text, extra
|
||||
|
Reference in New Issue
Block a user