MCPcopy Create free account
hub / github.com/pace/bricks / HandleRequest

Function HandleRequest

maintenance/errors/error.go:118–123  ·  view source on GitHub ↗

HandleRequest should be called with defer to recover panics in request handlers

(handlerName string, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

116
117// HandleRequest should be called with defer to recover panics in request handlers
118func HandleRequest(handlerName string, w http.ResponseWriter, r *http.Request) {
119 if rec := recover(); rec != nil {
120 paceHTTPPanicCounter.Inc()
121 HandleError(NewPanic(rec), handlerName, w, r)
122 }
123}
124
125// HandleError reports the passed error to sentry
126func HandleError(err error, handlerName string, w http.ResponseWriter, r *http.Request) {

Callers 15

GetTestHandlerFunction · 0.92
ProcessPaymentHandlerFunction · 0.92
GetPumpHandlerFunction · 0.92
DeduplicatePoiHandlerFunction · 0.92
MovePoiAtPositionHandlerFunction · 0.92
GetAppsHandlerFunction · 0.92
CreateAppHandlerFunction · 0.92
CheckForPaceAppHandlerFunction · 0.92
DeleteAppHandlerFunction · 0.92
GetAppHandlerFunction · 0.92

Calls 2

HandleErrorFunction · 0.85
NewPanicFunction · 0.85

Tested by 15

ProcessPaymentHandlerFunction · 0.74
GetPumpHandlerFunction · 0.74
DeduplicatePoiHandlerFunction · 0.74
MovePoiAtPositionHandlerFunction · 0.74
GetAppsHandlerFunction · 0.74
CreateAppHandlerFunction · 0.74
CheckForPaceAppHandlerFunction · 0.74
DeleteAppHandlerFunction · 0.74
GetAppHandlerFunction · 0.74
UpdateAppHandlerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…