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,23 @@
|
||||
package shopify
|
||||
|
||||
import "errors"
|
||||
|
||||
// ClientError reports whether err is a known client-facing Shopify config/sync error.
|
||||
func ClientError(err error) (msg string, ok bool) {
|
||||
switch {
|
||||
case err == nil:
|
||||
return "", false
|
||||
case errors.Is(err, ErrInvalidShopDomain),
|
||||
errors.Is(err, ErrBlockedShopDomain),
|
||||
errors.Is(err, ErrNotConfigured),
|
||||
errors.Is(err, ErrNotEnabled),
|
||||
errors.Is(err, ErrMissingCreds),
|
||||
errors.Is(err, ErrInvalidSyncScope),
|
||||
errors.Is(err, ErrInvalidScheduleInterval),
|
||||
errors.Is(err, ErrInvalidClientCredentials),
|
||||
errors.Is(err, ErrTokenExchangeFailed):
|
||||
return err.Error(), true
|
||||
default:
|
||||
return "", false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user