github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/error/not_found_error.go (about) 1 package error 2 3 type NotFoundError struct { 4 } 5 6 func (NotFoundError) Error() string { 7 return "not found" 8 } 9 10 func (NotFoundError) IsNotFound() bool { 11 return true 12 } 13 14 func (NotFoundError) Reason() ErrReason { 15 return ErrClusterNotFound 16 } 17 18 func (NotFoundError) Component() ErrComponent { 19 return ErrReconciler 20 } 21 22 func IsNotFoundError(err error) bool { 23 cause := UnwrapAll(err) 24 nfe, ok := cause.(interface { 25 IsNotFound() bool 26 }) 27 return ok && nfe.IsNotFound() 28 }