diff options
Diffstat (limited to 'models/project/project.go')
-rw-r--r-- | models/project/project.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/project/project.go b/models/project/project.go index 86a77947d8..af2c8ac2af 100644 --- a/models/project/project.go +++ b/models/project/project.go @@ -55,6 +55,10 @@ func (err ErrProjectNotExist) Error() string { return fmt.Sprintf("projects does not exist [id: %d]", err.ID) } +func (err ErrProjectNotExist) Unwrap() error { + return util.ErrNotExist +} + // ErrProjectBoardNotExist represents a "ProjectBoardNotExist" kind of error. type ErrProjectBoardNotExist struct { BoardID int64 @@ -70,6 +74,10 @@ func (err ErrProjectBoardNotExist) Error() string { return fmt.Sprintf("project board does not exist [id: %d]", err.BoardID) } +func (err ErrProjectBoardNotExist) Unwrap() error { + return util.ErrNotExist +} + // Project represents a project board type Project struct { ID int64 `xorm:"pk autoincr"` |