Caller should check the ResponseExtra.HasError() first to see whether the request fails (#28796)

`resp != nil` doesn't mean the request really succeeded. Add a comment
for requestJSONResp to clarify the behavior.
这个提交包含在:
wxiaoguang
2024-01-15 11:15:31 +00:00
提交者 GitHub
父节点 637451a45e
当前提交 b0e6c25535
修改 4 个文件,包含 4 行新增3 行删除
+1 -1
查看文件
@@ -22,7 +22,7 @@ func GenerateActionsRunnerToken(ctx context.Context, scope string) (string, Resp
})
resp, extra := requestJSONResp(req, &responseText{})
if resp == nil {
if extra.HasError() {
return "", extra
}
return resp.Text, extra