diff --git a/clouderror/wrap.go b/clouderror/wrap.go index befd629a..d8b4aee4 100644 --- a/clouderror/wrap.go +++ b/clouderror/wrap.go @@ -35,7 +35,7 @@ func WrapTransient(err error, msg string) error { func WrapTransientCaller(err error, msg string, caller Caller) error { if s, ok := status.FromError(err); ok { switch s.Code() { - case codes.Unavailable, codes.DeadlineExceeded, codes.Canceled, codes.Unauthenticated, codes.PermissionDenied: + case codes.Unavailable, codes.DeadlineExceeded, codes.Canceled: return &wrappedStatusError{status: status.New(s.Code(), msg), err: err, caller: caller} } } diff --git a/clouderror/wrap_test.go b/clouderror/wrap_test.go index 5f3672a7..e0d5e19f 100644 --- a/clouderror/wrap_test.go +++ b/clouderror/wrap_test.go @@ -39,16 +39,6 @@ func Test_WrapTransient(t *testing.T) { err: status.Error(codes.Unavailable, "transient"), expectedCode: codes.Unavailable, }, - { - name: "codes.Unauthenticated", - err: status.Error(codes.Unauthenticated, "transient"), - expectedCode: codes.Unauthenticated, - }, - { - name: "codes.PermissionDenied", - err: status.Error(codes.PermissionDenied, "transient"), - expectedCode: codes.PermissionDenied, - }, { name: "wrapped transient", err: Wrap(