I think recovering from panics in https://github.com/remind101/pkg/blob/master/httpx/middleware/recovery.go#L41-L51 should be an anti pattern, for a couple reasons:
- In general, it's bad practice to panic in the first place. Normal errors should be returned as an
error type.
- It makes debugging panics in dev really annoying, because you don't get the full stack trace.
I think the recovery middleware still has value, it should recover from the panic, report it to the reporter, then re-panic.