Skip to content

Commit

Permalink
Merge pull request #264 from airbrake/beego-fix
Browse files Browse the repository at this point in the history
Beego Status fix
  • Loading branch information
chimanjain authored Apr 19, 2022
2 parents 9ad6424 + d67b534 commit 5999c98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion beego/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ func New(notifier *gobrake.Notifier) web.FilterChain {
}
_, metric := gobrake.NewRouteMetric(goctx.TODO(), ctx.Input.Method(), routerPattern)
next(ctx)
metric.StatusCode = ctx.ResponseWriter.Status
statusCode := ctx.ResponseWriter.Status
if statusCode == 0 {
statusCode = 200
}
metric.StatusCode = statusCode
_ = notifier.Routes.Notify(goctx.TODO(), metric)

}
Expand Down

0 comments on commit 5999c98

Please sign in to comment.