gin error handler

This commit is contained in:
2026-01-23 21:33:36 -07:00
parent b9464adada
commit 3fd533091c
5 changed files with 47 additions and 25 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ func Handler(f HandlerFunc) gin.HandlerFunc {
return func(c *gin.Context) {
res, err := f(c)
if err != nil {
WriteError(c, err)
c.Error(err)
} else {
Write(c, res)
}