raven-go
raven-go copied to clipboard
Change RecoveryHandler to accept and return http.Handler
This is a PR for the proposal in #78. It makes RecoveryHandler idiomatic by accepting and returning http.Handler like middleware in other popular libraries. The previous functionality is exposed in the new RecoveryHandlerFunc method.
I just ran into this problem and would like to voice my support for this breaking change.
If API breaks are a concern, maybe it's time to look into gopkg.
I'm a huge proponent of having something like this! I wrote a custom wrapper earlier today because I was looking for this. I'd be happy to see NewRecoveryHandler used in order to avoid API breakage.