add space and finish item create/update mutations.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package slerrors
|
||||
|
||||
type forbiddenError struct {
|
||||
Message string
|
||||
}
|
||||
|
||||
func (e *forbiddenError) Error() string {
|
||||
return "forbidden: " + e.Message
|
||||
}
|
||||
|
||||
func Forbidden(message string) error {
|
||||
return &forbiddenError{Message: message}
|
||||
}
|
||||
|
||||
func IsForbidden(err error) bool {
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
_, ok := err.(*forbiddenError)
|
||||
return ok
|
||||
}
|
||||
Reference in New Issue
Block a user