aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo/wiki.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo/wiki.go')
-rw-r--r--models/repo/wiki.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/repo/wiki.go b/models/repo/wiki.go
index 72ec7c394b..c8886eaa34 100644
--- a/models/repo/wiki.go
+++ b/models/repo/wiki.go
@@ -30,6 +30,10 @@ func (err ErrWikiAlreadyExist) Error() string {
return fmt.Sprintf("wiki page already exists [title: %s]", err.Title)
}
+func (err ErrWikiAlreadyExist) Unwrap() error {
+ return util.ErrAlreadyExist
+}
+
// ErrWikiReservedName represents a reserved name error.
type ErrWikiReservedName struct {
Title string
@@ -45,6 +49,10 @@ func (err ErrWikiReservedName) Error() string {
return fmt.Sprintf("wiki title is reserved: %s", err.Title)
}
+func (err ErrWikiReservedName) Unwrap() error {
+ return util.ErrInvalidArgument
+}
+
// ErrWikiInvalidFileName represents an invalid wiki file name.
type ErrWikiInvalidFileName struct {
FileName string
@@ -60,6 +68,10 @@ func (err ErrWikiInvalidFileName) Error() string {
return fmt.Sprintf("Invalid wiki filename: %s", err.FileName)
}
+func (err ErrWikiInvalidFileName) Unwrap() error {
+ return util.ErrInvalidArgument
+}
+
// WikiCloneLink returns clone URLs of repository wiki.
func (repo *Repository) WikiCloneLink() *CloneLink {
return repo.cloneLink(true)