Initial commit of Descrybe v2 without local scratch artifacts.
Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package seo
|
||||
|
||||
import "errors"
|
||||
|
||||
// Sentinel errors for SEO apply / lookups.
|
||||
var (
|
||||
ErrNotFound = errors.New("not found")
|
||||
ErrInvalidMode = errors.New("mode must be template or ai")
|
||||
)
|
||||
|
||||
// ClientError reports whether err is a known client-facing SEO validation error.
|
||||
func ClientError(err error) (msg string, ok bool) {
|
||||
switch {
|
||||
case err == nil:
|
||||
return "", false
|
||||
case errors.Is(err, ErrInvalidMode):
|
||||
return err.Error(), true
|
||||
default:
|
||||
return "", false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user