func ErrByStatus(status int) *Error {
	switch status {
	case 400:
		return ErrBadRequest
	case 401:
		return ErrUnauthorized
	case 402:
		return ErrPaymentRequired
	case 403:
		return ErrForbidden
	case 404:
		return ErrNotFound
	case 405:
		return ErrMethodNotAllowed
	case 406:
		return ErrNotAcceptable
	case 407:
		return ErrProxyAuthRequired
	case 408:
		return ErrRequestTimeout
	case 409:
		return ErrConflict
	case 410:
		return ErrGone
	case 411:
		return ErrLengthRequired
	case 412:
		return ErrPreconditionFailed
	case 413:
		return ErrRequestEntityTooLarge
	case 414:
		return ErrRequestURITooLong
	case 415:
		return ErrUnsupportedMediaType
	case 416:
		return ErrRequestedRangeNotSatisfiable
	case 417:
		return ErrExpectationFailed
	case 418:
		return ErrTeapot
	case 421:
		return ErrMisdirectedRequest
	case 422:
		return ErrUnprocessableEntity
	case 423:
		return ErrLocked
	case 424:
		return ErrFailedDependency
	case 426:
		return ErrUpgradeRequired
	case 428:
		return ErrPreconditionRequired
	case 429:
		return ErrTooManyRequests
	case 431:
		return ErrRequestHeaderFieldsTooLarge
	case 451:
		return ErrUnavailableForLegalReasons
	case 499:
		return ErrClientClosedRequest
	case 500:
		return ErrInternalServerError
	case 501:
		return ErrNotImplemented
	case 502:
		return ErrBadGateway
	case 503:
		return ErrServiceUnavailable
	case 504:
		return ErrGatewayTimeout
	case 505:
		return ErrHTTPVersionNotSupported
	case 506:
		return ErrVariantAlsoNegotiates
	case 507:
		return ErrInsufficientStorage
	case 508:
		return ErrLoopDetected
	case 510:
		return ErrNotExtended
	case 511:
		return ErrNetworkAuthenticationRequired
	default:
		return Err.WithCode(status)
	}
}
ErrByStatus returns a gear.Error by http status.
package gear
import "net/http"
const (
	MIMEApplicationJSON                  = "application/json"
	MIMEApplicationJSONCharsetUTF8       = "application/json; charset=utf-8"
	MIMEApplicationJavaScript            = "application/javascript"
	MIMEApplicationJavaScriptCharsetUTF8 = "application/javascript; charset=utf-8"
	MIMEApplicationXML                   = "application/xml"
	MIMEApplicationXMLCharsetUTF8        = "application/xml; charset=utf-8"
	MIMEApplicationYAML                  = "application/yaml"
	MIMEApplicationTOML                  = "application/toml"  
	MIMEApplicationForm                  = "application/x-www-form-urlencoded"
	MIMEApplicationProtobuf              = "application/protobuf"  
	MIMETextHTML                         = "text/html"
	MIMETextHTMLCharsetUTF8              = "text/html; charset=utf-8"
	MIMETextPlain                        = "text/plain"
	MIMETextPlainCharsetUTF8             = "text/plain; charset=utf-8"
	MIMEMultipartForm                    = "multipart/form-data"
	MIMEOctetStream                      = "application/octet-stream"
	MIMEApplicationSchemaJSON            = "application/schema+json"
	MIMEApplicationSchemaInstanceJSON    = "application/schema-instance+json"
	MIMEApplicationSchemaJSONLD          = "application/ld+json"
	MIMEApplicationSchemaGraphQL         = "application/graphql"
)
const (
	HeaderAccept             = "Accept"               
	HeaderAcceptCharset      = "Accept-Charset"       
	HeaderAcceptEncoding     = "Accept-Encoding"      
	HeaderAcceptLanguage     = "Accept-Language"      
	HeaderAuthorization      = "Authorization"        
	HeaderCacheControl       = "Cache-Control"        
	HeaderContentLength      = "Content-Length"       
	HeaderContentMD5         = "Content-MD5"          
	HeaderContentType        = "Content-Type"         
	HeaderIfMatch            = "If-Match"             
	HeaderIfModifiedSince    = "If-Modified-Since"    
	HeaderIfNoneMatch        = "If-None-Match"        
	HeaderIfRange            = "If-Range"             
	HeaderIfUnmodifiedSince  = "If-Unmodified-Since"  
	HeaderMaxForwards        = "Max-Forwards"         
	HeaderProxyAuthorization = "Proxy-Authorization"  
	HeaderPragma             = "Pragma"               
	HeaderRange              = "Range"                
	HeaderReferer            = "Referer"              
	HeaderUserAgent          = "User-Agent"           
	HeaderTE                 = "TE"                   
	HeaderVia                = "Via"                  
	HeaderWarning            = "Warning"              
	HeaderCookie             = "Cookie"               
	HeaderOrigin             = "Origin"               
	HeaderAcceptDatetime     = "Accept-Datetime"      
	HeaderXRequestedWith     = "X-Requested-With"     
	HeaderXRequestID         = "X-Request-Id"         
	HeaderXCanary            = "X-Canary"             
	HeaderXForwardedScheme   = "X-Forwarded-Scheme"   
	HeaderXForwardedProto    = "X-Forwarded-Proto"    
	HeaderXForwardedFor      = "X-Forwarded-For"      
	HeaderXForwardedHost     = "X-Forwarded-Host"     
	HeaderXForwardedServer   = "X-Forwarded-Server"   
	HeaderXRealIP            = "X-Real-Ip"            
	HeaderXRealScheme        = "X-Real-Scheme"        
	HeaderAccessControlAllowOrigin      = "Access-Control-Allow-Origin"       
	HeaderAccessControlAllowMethods     = "Access-Control-Allow-Methods"      
	HeaderAccessControlAllowHeaders     = "Access-Control-Allow-Headers"      
	HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"  
	HeaderAccessControlExposeHeaders    = "Access-Control-Expose-Headers"     
	HeaderAccessControlMaxAge           = "Access-Control-Max-Age"            
	HeaderAccessControlRequestMethod    = "Access-Control-Request-Method"     
	HeaderAccessControlRequestHeaders   = "Access-Control-Request-Headers"    
	HeaderAcceptPatch                   = "Accept-Patch"                      
	HeaderAcceptRanges                  = "Accept-Ranges"                     
	HeaderAllow                         = "Allow"                             
	HeaderContentEncoding               = "Content-Encoding"                  
	HeaderContentLanguage               = "Content-Language"                  
	HeaderContentLocation               = "Content-Location"                  
	HeaderContentDisposition            = "Content-Disposition"               
	HeaderContentRange                  = "Content-Range"                     
	HeaderETag                          = "ETag"                              
	HeaderExpires                       = "Expires"                           
	HeaderLastModified                  = "Last-Modified"                     
	HeaderLink                          = "Link"                              
	HeaderLocation                      = "Location"                          
	HeaderP3P                           = "P3P"                               
	HeaderProxyAuthenticate             = "Proxy-Authenticate"                
	HeaderRefresh                       = "Refresh"                           
	HeaderRetryAfter                    = "Retry-After"                       
	HeaderServer                        = "Server"                            
	HeaderSetCookie                     = "Set-Cookie"                        
	HeaderStrictTransportSecurity       = "Strict-Transport-Security"         
	HeaderTransferEncoding              = "Transfer-Encoding"                 
	HeaderUpgrade                       = "Upgrade"                           
	HeaderVary                          = "Vary"                              
	HeaderWWWAuthenticate               = "WWW-Authenticate"                  
	HeaderPublicKeyPins                 = "Public-Key-Pins"                   
	HeaderPublicKeyPinsReportOnly       = "Public-Key-Pins-Report-Only"       
	HeaderRefererPolicy                 = "Referrer-Policy"                   
	HeaderXFrameOptions                   = "X-Frame-Options"                      
	HeaderXXSSProtection                  = "X-XSS-Protection"                     
	HeaderContentSecurityPolicy           = "Content-Security-Policy"              
	HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"  
	HeaderXContentSecurityPolicy          = "X-Content-Security-Policy"            
	HeaderXWebKitCSP                      = "X-WebKit-CSP"                         
	HeaderXContentTypeOptions             = "X-Content-Type-Options"               
	HeaderXPoweredBy                      = "X-Powered-By"                         
	HeaderXUACompatible                   = "X-UA-Compatible"                      
	HeaderXCSRFToken                      = "X-CSRF-Token"                         
	HeaderXHTTPMethodOverride             = "X-HTTP-Method-Override"               
	HeaderXDNSPrefetchControl             = "X-DNS-Prefetch-Control"               
	HeaderXDownloadOptions                = "X-Download-Options"                   
)
var (
	Err = &Error{Code: http.StatusInternalServerError, Err: "Error"}
	ErrBadRequest                    = Err.WithCode(http.StatusBadRequest).WithErr("BadRequest")
	ErrUnauthorized                  = Err.WithCode(http.StatusUnauthorized).WithErr("Unauthorized")
	ErrPaymentRequired               = Err.WithCode(http.StatusPaymentRequired).WithErr("PaymentRequired")
	ErrForbidden                     = Err.WithCode(http.StatusForbidden).WithErr("Forbidden")
	ErrNotFound                      = Err.WithCode(http.StatusNotFound).WithErr("NotFound")
	ErrMethodNotAllowed              = Err.WithCode(http.StatusMethodNotAllowed).WithErr("MethodNotAllowed")
	ErrNotAcceptable                 = Err.WithCode(http.StatusNotAcceptable).WithErr("NotAcceptable")
	ErrProxyAuthRequired             = Err.WithCode(http.StatusProxyAuthRequired).WithErr("ProxyAuthenticationRequired")
	ErrRequestTimeout                = Err.WithCode(http.StatusRequestTimeout).WithErr("RequestTimeout")
	ErrConflict                      = Err.WithCode(http.StatusConflict).WithErr("Conflict")
	ErrGone                          = Err.WithCode(http.StatusGone).WithErr("Gone")
	ErrLengthRequired                = Err.WithCode(http.StatusLengthRequired).WithErr("LengthRequired")
	ErrPreconditionFailed            = Err.WithCode(http.StatusPreconditionFailed).WithErr("PreconditionFailed")
	ErrRequestEntityTooLarge         = Err.WithCode(http.StatusRequestEntityTooLarge).WithErr("RequestEntityTooLarge")
	ErrRequestURITooLong             = Err.WithCode(http.StatusRequestURITooLong).WithErr("RequestURITooLong")
	ErrUnsupportedMediaType          = Err.WithCode(http.StatusUnsupportedMediaType).WithErr("UnsupportedMediaType")
	ErrRequestedRangeNotSatisfiable  = Err.WithCode(http.StatusRequestedRangeNotSatisfiable).WithErr("RequestedRangeNotSatisfiable")
	ErrExpectationFailed             = Err.WithCode(http.StatusExpectationFailed).WithErr("ExpectationFailed")
	ErrTeapot                        = Err.WithCode(http.StatusTeapot).WithErr("Teapot")
	ErrMisdirectedRequest            = Err.WithCode(421).WithErr("MisdirectedRequest")
	ErrUnprocessableEntity           = Err.WithCode(http.StatusUnprocessableEntity).WithErr("UnprocessableEntity")
	ErrLocked                        = Err.WithCode(http.StatusLocked).WithErr("Locked")
	ErrFailedDependency              = Err.WithCode(http.StatusFailedDependency).WithErr("FailedDependency")
	ErrUpgradeRequired               = Err.WithCode(http.StatusUpgradeRequired).WithErr("UpgradeRequired")
	ErrPreconditionRequired          = Err.WithCode(http.StatusPreconditionRequired).WithErr("PreconditionRequired")
	ErrTooManyRequests               = Err.WithCode(http.StatusTooManyRequests).WithErr("TooManyRequests")
	ErrRequestHeaderFieldsTooLarge   = Err.WithCode(http.StatusRequestHeaderFieldsTooLarge).WithErr("RequestHeaderFieldsTooLarge")
	ErrUnavailableForLegalReasons    = Err.WithCode(http.StatusUnavailableForLegalReasons).WithErr("UnavailableForLegalReasons")
	ErrClientClosedRequest           = Err.WithCode(499).WithErr("ClientClosedRequest")
	ErrInternalServerError           = Err.WithCode(http.StatusInternalServerError).WithErr("InternalServerError")
	ErrNotImplemented                = Err.WithCode(http.StatusNotImplemented).WithErr("NotImplemented")
	ErrBadGateway                    = Err.WithCode(http.StatusBadGateway).WithErr("BadGateway")
	ErrServiceUnavailable            = Err.WithCode(http.StatusServiceUnavailable).WithErr("ServiceUnavailable")
	ErrGatewayTimeout                = Err.WithCode(http.StatusGatewayTimeout).WithErr("GatewayTimeout")
	ErrHTTPVersionNotSupported       = Err.WithCode(http.StatusHTTPVersionNotSupported).WithErr("HTTPVersionNotSupported")
	ErrVariantAlsoNegotiates         = Err.WithCode(http.StatusVariantAlsoNegotiates).WithErr("VariantAlsoNegotiates")
	ErrInsufficientStorage           = Err.WithCode(http.StatusInsufficientStorage).WithErr("InsufficientStorage")
	ErrLoopDetected                  = Err.WithCode(http.StatusLoopDetected).WithErr("LoopDetected")
	ErrNotExtended                   = Err.WithCode(http.StatusNotExtended).WithErr("NotExtended")
	ErrNetworkAuthenticationRequired = Err.WithCode(http.StatusNetworkAuthenticationRequired).WithErr("NetworkAuthenticationRequired")
)