MCPcopy
hub / github.com/cortexlabs/cortex / PanicMiddleware

Function PanicMiddleware

pkg/operator/endpoints/middleware.go:39–44  ·  view source on GitHub ↗
(next http.Handler)

Source from the content-addressed store, hash-verified

37)
38
39func PanicMiddleware(next http.Handler) http.Handler {
40 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
41 defer recoverAndRespond(w, r)
42 next.ServeHTTP(w, r)
43 })
44}
45
46func ClientIDMiddleware(next http.Handler) http.Handler {
47 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 2

recoverAndRespondFunction · 0.85
ServeHTTPMethod · 0.45

Tested by

no test coverage detected