diff options
Diffstat (limited to 'models/error.go')
-rw-r--r-- | models/error.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/models/error.go b/models/error.go index 7c89373183..8f508598a1 100644 --- a/models/error.go +++ b/models/error.go @@ -275,6 +275,19 @@ func (err ErrInvalidCloneAddr) Error() string { err.IsURLError, err.IsInvalidPath, err.IsPermissionDenied) } +type ErrUpdateTaskNotExist struct { + UUID string +} + +func IsErrUpdateTaskNotExist(err error) bool { + _, ok := err.(ErrUpdateTaskNotExist) + return ok +} + +func (err ErrUpdateTaskNotExist) Error() string { + return fmt.Sprintf("update task does not exist [uuid: %s]", err.UUID) +} + // __ __ ___. .__ __ // / \ / \ ____\_ |__ | |__ ____ ____ | | __ // \ \/\/ // __ \| __ \| | \ / _ \ / _ \| |/ / |