Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/helper/error.go')
-rw-r--r--internal/helper/error.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/helper/error.go b/internal/helper/error.go
index 5196513e0..7548326af 100644
--- a/internal/helper/error.go
+++ b/internal/helper/error.go
@@ -51,6 +51,9 @@ func ErrAlreadyExists(err error) error { return wrapError(codes.AlreadyExists, e
// ErrAborted wraps err with codes.Aborted, unless err is already a gRPC error.
func ErrAborted(err error) error { return wrapError(codes.Aborted, err) }
+// ErrResourceExhausted wraps err with codes.ResourceExhausted, unless err is already a gRPC error.
+func ErrResourceExhausted(err error) error { return wrapError(codes.ResourceExhausted, err) }
+
// wrapError wraps the given error with the error code unless it's already a gRPC error. If given
// nil it will return nil.
func wrapError(code codes.Code, err error) error {