stufflog graphql server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
345 B

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
}