MCPcopy
hub / github.com/perkeep/perkeep / RecoverJSON

Function RecoverJSON

internal/httputil/httputil.go:180–186  ·  view source on GitHub ↗

RecoverJSON is like Recover but returns with a JSON response.

(rw http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

178
179// RecoverJSON is like Recover but returns with a JSON response.
180func RecoverJSON(rw http.ResponseWriter, req *http.Request) {
181 e := recover()
182 if e == nil {
183 return
184 }
185 ServeJSONError(rw, e)
186}
187
188type httpCoder interface {
189 HTTPCode() int

Callers 9

serveRecentPermanodesMethod · 0.92
serveClaimsMethod · 0.92
serveSignerAttrValueMethod · 0.92
serveEdgesToMethod · 0.92
serveQueryMethod · 0.92
serveSignerPathsMethod · 0.92
serveDescribeMethod · 0.92
RecoverFunction · 0.85

Calls 1

ServeJSONErrorFunction · 0.85

Tested by

no test coverage detected