1
0

feat(webhooks): validate events and target url

This commit is contained in:
kolaente
2023-10-20 12:42:28 +02:00
parent 61cd08fa13
commit 55d345e236
3 changed files with 32 additions and 15 deletions

View File

@ -110,6 +110,17 @@ func (err ValidationHTTPError) Error() string {
return theErr.Error()
}
func InvalidFieldError(fields []string) error {
return ValidationHTTPError{
HTTPError: web.HTTPError{
HTTPCode: http.StatusPreconditionFailed,
Code: ErrCodeInvalidData,
Message: "Invalid Data",
},
InvalidFields: fields,
}
}
// ===========
// Project errors
// ===========