diff options
Diffstat (limited to 'models/repo/release.go')
-rw-r--r-- | models/repo/release.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/repo/release.go b/models/repo/release.go index 2b484c9b84..2e7bc6d322 100644 --- a/models/repo/release.go +++ b/models/repo/release.go @@ -37,6 +37,10 @@ func (err ErrReleaseAlreadyExist) Error() string { return fmt.Sprintf("release tag already exist [tag_name: %s]", err.TagName) } +func (err ErrReleaseAlreadyExist) Unwrap() error { + return util.ErrAlreadyExist +} + // ErrReleaseNotExist represents a "ReleaseNotExist" kind of error. type ErrReleaseNotExist struct { ID int64 @@ -53,6 +57,10 @@ func (err ErrReleaseNotExist) Error() string { return fmt.Sprintf("release tag does not exist [id: %d, tag_name: %s]", err.ID, err.TagName) } +func (err ErrReleaseNotExist) Unwrap() error { + return util.ErrNotExist +} + // Release represents a release of repository. type Release struct { ID int64 `xorm:"pk autoincr"` |