Skip to content

Commit 7fb09fc

Browse files
committed
refactor(handlers): wrap error handling in GetAudits
Signed-off-by: yxxhero <aiopsclub@163.com>
1 parent 80d109e commit 7fb09fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

manager/handlers/audit.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ func (h *Handlers) GetAudits(ctx *gin.Context) {
4848
h.setPaginationDefault(&query.Page, &query.PerPage)
4949
audits, count, err := h.service.GetAudits(ctx.Request.Context(), query)
5050
if err != nil {
51-
ctx.Error(err) //nolint: errcheck
51+
func() {
52+
_ = ctx.Error(err)
53+
}()
5254
return
5355
}
5456

0 commit comments

Comments
 (0)