aboutsummaryrefslogtreecommitdiffstats
path: root/models/webhook
diff options
context:
space:
mode:
Diffstat (limited to 'models/webhook')
-rw-r--r--models/webhook/webhook.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/models/webhook/webhook.go b/models/webhook/webhook.go
index ac09220630..83200a3d1c 100644
--- a/models/webhook/webhook.go
+++ b/models/webhook/webhook.go
@@ -41,6 +41,10 @@ func (err ErrWebhookNotExist) Error() string {
return fmt.Sprintf("webhook does not exist [id: %d]", err.ID)
}
+func (err ErrWebhookNotExist) Unwrap() error {
+ return util.ErrNotExist
+}
+
// ErrHookTaskNotExist represents a "HookTaskNotExist" kind of error.
type ErrHookTaskNotExist struct {
HookID int64
@@ -57,6 +61,10 @@ func (err ErrHookTaskNotExist) Error() string {
return fmt.Sprintf("hook task does not exist [hook: %d, uuid: %s]", err.HookID, err.UUID)
}
+func (err ErrHookTaskNotExist) Unwrap() error {
+ return util.ErrNotExist
+}
+
// HookContentType is the content type of a web hook
type HookContentType int