diff --git a/backend/app/api/v1/helper/helper.go b/backend/app/api/v1/helper/helper.go index 7e5566a29..330917ea5 100644 --- a/backend/app/api/v1/helper/helper.go +++ b/backend/app/api/v1/helper/helper.go @@ -135,11 +135,6 @@ func CheckBind(req interface{}, c *gin.Context) error { return nil } -func ErrResponse(ctx *gin.Context, code int) { - ctx.JSON(code, nil) - ctx.Abort() -} - func ErrWithHtml(ctx *gin.Context, code int, scope string) { if code == 444 { ctx.String(444, "") diff --git a/backend/middleware/helper.go b/backend/middleware/helper.go index eb422ece7..b1ead8c09 100644 --- a/backend/middleware/helper.go +++ b/backend/middleware/helper.go @@ -26,6 +26,10 @@ func LoadErrCode() int { return http.StatusRequestTimeout case "416": return http.StatusRequestedRangeNotSatisfiable + case "500": + return http.StatusInternalServerError + case "444": + return 444 default: return http.StatusOK }