MCPcopy Index your code
hub / github.com/cortexproject/cortex / IsRequestBodyTooLarge

Function IsRequestBodyTooLarge

pkg/util/http.go:30–32  ·  view source on GitHub ↗

IsRequestBodyTooLarge returns true if the error is "http: request body too large".

(err error)

Source from the content-addressed store, hash-verified

28
29// IsRequestBodyTooLarge returns true if the error is "http: request body too large".
30func IsRequestBodyTooLarge(err error) bool {
31 return err != nil && strings.Contains(err.Error(), "http: request body too large")
32}
33
34// BasicAuth configures basic authentication for HTTP clients.
35type BasicAuth struct {

Callers 6

ServeHTTPMethod · 0.92
writeErrorFunction · 0.92
getStatusCodeFromErrorFunction · 0.92
doQuorumMethod · 0.92
doUnaryMethod · 0.92

Calls 1

ErrorMethod · 0.45

Tested by 1