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

Unified Diff: common/auth/internal/disk_cache.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: copyright 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: common/auth/internal/disk_cache.go
diff --git a/common/auth/internal/disk_cache.go b/common/auth/internal/disk_cache.go
index 27a5ce53e2a8015c3c9a750f495a316a0d52910b..eae18f796434a087fbfd14e5bed5a98a4c0b28fe 100644
--- a/common/auth/internal/disk_cache.go
+++ b/common/auth/internal/disk_cache.go
@@ -15,7 +15,6 @@ import (
"golang.org/x/oauth2"
"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/retry"
)
@@ -198,7 +197,7 @@ func (c *DiskTokenCache) writeCacheFile(cache *cacheFile, now time.Time) error {
// a retry in updateCacheFile.
if err = os.Rename(tmp.Name(), c.absPath()); err != nil {
cleanup()
- return errors.WrapTransient(err)
+ return retry.Tag.Apply(err)
}
return nil
}

Powered by Google App Engine
This is Rietveld 408576698