Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: tokenserver/appengine/impl/machinetoken/rpc_mint_machine_token.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: more refactor Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tokenserver/appengine/impl/machinetoken/rpc_mint_machine_token.go
diff --git a/tokenserver/appengine/impl/machinetoken/rpc_mint_machine_token.go b/tokenserver/appengine/impl/machinetoken/rpc_mint_machine_token.go
index cf873bc12b57d337c7669626a93a944268cadfe3..a5122f8459fb91be5e7ec776fd2557384970986d 100644
--- a/tokenserver/appengine/impl/machinetoken/rpc_mint_machine_token.go
+++ b/tokenserver/appengine/impl/machinetoken/rpc_mint_machine_token.go
@@ -17,9 +17,9 @@ import (
"github.com/luci/gae/service/info"
"github.com/luci/luci-go/common/clock"
- "github.com/luci/luci-go/common/errors"
"github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/common/proto/google"
+ "github.com/luci/luci-go/common/retry/transient"
"github.com/luci/luci-go/server/auth"
"github.com/luci/luci-go/server/auth/signing"
@@ -216,7 +216,7 @@ func (r *MintMachineTokenRPC) mintLuciMachineToken(c context.Context, args mintT
},
},
}, body, nil
- case errors.IsTransient(err):
+ case transient.Tag.In(err):
return nil, nil, grpc.Errorf(codes.Internal, "failed to generate machine token - %s", err)
default:
resp, err := r.mintingErrorResponse(c, minter.ErrorCode_MACHINE_TOKEN_MINTING_ERROR, "%s", err)

Powered by Google App Engine
This is Rietveld 408576698