| Index: common/auth/internal/luci_ctx.go
|
| diff --git a/common/auth/internal/luci_ctx.go b/common/auth/internal/luci_ctx.go
|
| index 5816252e04d875e354a814199c9f960baac2cf9d..0e5ddd700feab4b283153cc5df8d778d15aa353f 100644
|
| --- a/common/auth/internal/luci_ctx.go
|
| +++ b/common/auth/internal/luci_ctx.go
|
| @@ -20,8 +20,8 @@ import (
|
| "golang.org/x/oauth2"
|
|
|
| "github.com/luci/luci-go/common/auth/localauth/rpcs"
|
| - "github.com/luci/luci-go/common/errors"
|
| "github.com/luci/luci-go/common/logging"
|
| + "github.com/luci/luci-go/common/retry/transient"
|
| "github.com/luci/luci-go/lucictx"
|
| )
|
|
|
| @@ -119,18 +119,18 @@ func (p *luciContextTokenProvider) MintToken(ctx context.Context, base *oauth2.T
|
|
|
| httpResp, err := ctxhttp.Do(ctx, &http.Client{Transport: p.transport}, httpReq)
|
| if err != nil {
|
| - return nil, errors.WrapTransient(err)
|
| + return nil, transient.Tag.Apply(err)
|
| }
|
| defer httpResp.Body.Close()
|
| respBody, err := ioutil.ReadAll(httpResp.Body)
|
| if err != nil {
|
| - return nil, errors.WrapTransient(err)
|
| + return nil, transient.Tag.Apply(err)
|
| }
|
|
|
| if httpResp.StatusCode != 200 {
|
| err := fmt.Errorf("local auth - HTTP %d: %s", httpResp.StatusCode, strings.TrimSpace(string(respBody)))
|
| if httpResp.StatusCode >= 500 {
|
| - return nil, errors.WrapTransient(err)
|
| + return nil, transient.Tag.Apply(err)
|
| }
|
| return nil, err
|
| }
|
|
|