MCPcopy Index your code
hub / github.com/coder/coder / writeRequestBodyTooLarge

Function writeRequestBodyTooLarge

aibridge/bridge.go:351–356  ·  view source on GitHub ↗

writeRequestBodyTooLarge writes a human-readable 413 response indicating that the request body exceeded maxRequestBodyBytes.

(w http.ResponseWriter)

Source from the content-addressed store, hash-verified

349// writeRequestBodyTooLarge writes a human-readable 413 response indicating that
350// the request body exceeded maxRequestBodyBytes.
351func writeRequestBodyTooLarge(w http.ResponseWriter) {
352 http.Error(w, fmt.Sprintf(
353 "Request body too large. The maximum allowed request body size is %dMiB.",
354 maxRequestBodyBytes>>20,
355 ), http.StatusRequestEntityTooLarge)
356}
357
358// ServeHTTP exposes the internal http.Handler, which has all [Provider]s' routes registered.
359// It also tracks inflight requests.

Callers 2

newInterceptionProcessorFunction · 0.85
newPassthroughRouterFunction · 0.85

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected