diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2019-03-29 14:29:23 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2019-03-29 14:29:23 +0300 |
commit | c02b9ad129f348d080fc477172376400d58f19a8 (patch) | |
tree | 4a0ca4cf13a45cfb7491adde8e0eff1e4b71f486 /internal/helper/error.go | |
parent | b88c19f98b575f1ac85df01b902b4d4e8dd9dc17 (diff) |
UnlinkRepositoryFromObjectPool: stop removing objects/info/alternates
Diffstat (limited to 'internal/helper/error.go')
-rw-r--r-- | internal/helper/error.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/helper/error.go b/internal/helper/error.go index c20a1690a..81975315d 100644 --- a/internal/helper/error.go +++ b/internal/helper/error.go @@ -26,6 +26,9 @@ func ErrInvalidArgument(err error) error { return DecorateError(codes.InvalidArg // ErrPreconditionFailed wraps error with codes.FailedPrecondition, unless err is already a grpc error func ErrPreconditionFailed(err error) error { return DecorateError(codes.FailedPrecondition, err) } +// ErrNotFound wraps error with codes.NotFound, unless err is already a grpc error +func ErrNotFound(err error) error { return DecorateError(codes.NotFound, err) } + // GrpcCode emulates the old grpc.Code function: it translates errors into codes.Code values. func GrpcCode(err error) codes.Code { if err == nil { |