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

Unified Diff: tokenserver/appengine/impl/certconfig/crl.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/certconfig/crl.go
diff --git a/tokenserver/appengine/impl/certconfig/crl.go b/tokenserver/appengine/impl/certconfig/crl.go
index f1fd6903c1bbf1e2579510ebb062762ceb758ea6..2be9d1611ee2b06e8f38f92ec313e4ee3c20ff6e 100644
--- a/tokenserver/appengine/impl/certconfig/crl.go
+++ b/tokenserver/appengine/impl/certconfig/crl.go
@@ -21,6 +21,7 @@ import (
"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/tokenserver/api/admin/v1"
@@ -273,7 +274,7 @@ func (ch *CRLChecker) refetchShard(c context.Context, idx int, prev lazyslot.Val
case err == ds.ErrNoSuchEntity:
return lazyslot.Value{}, fmt.Errorf("shard header %q is missing", hdr.ID)
case err != nil:
- return lazyslot.Value{}, errors.WrapTransient(err)
+ return lazyslot.Value{}, transient.Tag.Apply(err)
}
// The currently cached copy is still good enough?
if hdr.SHA1 == prevState.sha1 {
@@ -292,7 +293,7 @@ func (ch *CRLChecker) refetchShard(c context.Context, idx int, prev lazyslot.Val
case err == ds.ErrNoSuchEntity:
return lazyslot.Value{}, fmt.Errorf("shard body %q is missing", hdr.ID)
case err != nil:
- return lazyslot.Value{}, errors.WrapTransient(err)
+ return lazyslot.Value{}, transient.Tag.Apply(err)
}
// Unzip and deserialize.

Powered by Google App Engine
This is Rietveld 408576698