MCPcopy
hub / github.com/authgear/authgear-server / HasCause

Method HasCause

pkg/api/apierrors/error.go:66–78  ·  view source on GitHub ↗
(kind string)

Source from the content-addressed store, hash-verified

64}
65
66func (e *APIError) HasCause(kind string) bool {
67 if c, ok := e.Info_ReadOnly["cause"].(Cause); ok {
68 return c.Kind() == kind
69 } else if cs, ok := e.Info_ReadOnly["causes"].([]Cause); ok {
70 for _, c := range cs {
71 if c.Kind() == kind {
72 return true
73 }
74 }
75 }
76
77 return false
78}
79
80func (e *APIError) SkipLogging() bool {
81 return e.Kind.IsSkipLoggingToExternalService

Callers 5

handleBiometricSetupMethod · 0.80
IsErrDuplicatedIdentityFunction · 0.80

Calls 1

KindMethod · 0.65

Tested by

no test coverage detected