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

Function statusCodeFromError

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

Source from the content-addressed store, hash-verified

3858}
3859
3860func statusCodeFromError(err error) int {
3861 if err == nil {
3862 return 0
3863 }
3864 type statusCoder interface {
3865 StatusCode() int
3866 }
3867 var sc statusCoder
3868 if errors.As(err, &sc) && sc != nil {
3869 return sc.StatusCode()
3870 }
3871 return 0
3872}
3873
3874func isUnauthorizedError(err error) bool {
3875 if err == nil {

Calls 1

StatusCodeMethod · 0.95