MCPcopy Create free account
hub / github.com/PuerNya/git-proxy / responseWithWarn

Function responseWithWarn

main.go:642–648  ·  view source on GitHub ↗
(msg string)

Source from the content-addressed store, hash-verified

640}
641
642func responseWithWarn(msg string) http.Handler {
643 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
644 log.WarnContext(r.Context(), msg)
645 render.Status(r, http.StatusInternalServerError)
646 render.PlainText(w, r, msg)
647 })
648}
649
650func responseWithError(err error) http.Handler {
651 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Callers 1

finalHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected