diff --git a/router/handler.go b/router/handler.go index 2d16792..6aeec13 100644 --- a/router/handler.go +++ b/router/handler.go @@ -138,13 +138,12 @@ func (s *server) formatError(ctx *gin.Context, err any) exception.IException { func (s *server) RequestHandler(uriCfg UriConfig) gin.HandlerFunc { return func(ctx *gin.Context) { var ( - err error e exception.IException handleResult any inputValue reflect.Value ) - if _, inputValue, e = s.initRequest(ctx, uriCfg); nil != err { + if _, inputValue, e = s.initRequest(ctx, uriCfg); nil != e { response.SendWithException(ctx, e, &define.ResponseOption{ ContentType: consts.MimeTypeJson, })