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

Method HTTPStatusCode

sdk/access/errors.go:49–54  ·  view source on GitHub ↗

HTTPStatusCode returns a safe fallback for missing status codes.

()

Source from the content-addressed store, hash-verified

47
48// HTTPStatusCode returns a safe fallback for missing status codes.
49func (e *AuthError) HTTPStatusCode() int {
50 if e == nil || e.StatusCode <= 0 {
51 return http.StatusInternalServerError
52 }
53 return e.StatusCode
54}
55
56func newAuthError(code AuthErrorCode, message string, statusCode int, cause error) *AuthError {
57 return &AuthError{

Callers 1

AuthMiddlewareFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected