Skip to content

Commit

Permalink
Merge pull request #45 from BugFixes/Virtual-branch
Browse files Browse the repository at this point in the history
fix: update recoverer middleware to properly handle panics
  • Loading branch information
Keloran authored May 13, 2024
2 parents 6af9841 + ff2179c commit 9ff1d7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion middleware/recoverer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import (
func Recoverer(next http.Handler) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {
defer func() {
if rvr := recover(); rvr != nil && rvr != http.ErrAbortHandler {
rvr := recover()
if rvr != nil && rvr != http.ErrAbortHandler {

logEntry := GetLogEntry(r)
if logEntry != nil {
Expand Down

0 comments on commit 9ff1d7e

Please sign in to comment.