MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / isUnauthorizedError

Function isUnauthorizedError

sdk/cliproxy/auth/conductor.go:3874–3883  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

3872}
3873
3874func isUnauthorizedError(err error) bool {
3875 if err == nil {
3876 return false
3877 }
3878 if statusCodeFromError(err) == http.StatusUnauthorized {
3879 return true
3880 }
3881 raw := strings.ToLower(err.Error())
3882 return strings.Contains(raw, "status 401") || strings.Contains(raw, "401 unauthorized")
3883}
3884
3885func hasUnauthorizedAuthFailure(auth *Auth) bool {
3886 if auth == nil || auth.LastError == nil {

Callers 2

refreshErrorFromErrorFunction · 0.85
refreshAuthMethod · 0.85

Calls 2

statusCodeFromErrorFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected