Skip to content

Commit

Permalink
Remove recover on Bind
Browse files Browse the repository at this point in the history
  • Loading branch information
limpo1989 committed Jan 7, 2024
1 parent 0c2b26e commit 7c050e1
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,6 @@ func Bind(fn interface{}, render Renderer) http.HandlerFunc {
var returnValues []reflect.Value
var err error

defer func() {
if r := recover(); nil != r {
if e, ok := r.(error); ok {
err = fmt.Errorf("%s: %w", request.URL.Path, e)
} else {
err = fmt.Errorf("%s: %v", request.URL.Path, r)
}

// render error response
render.Render(webCtx, err, nil)
}
}()

ctxValue := reflect.ValueOf(ctx)

switch fnType.NumIn() {
Expand Down

0 comments on commit 7c050e1

Please sign in to comment.