feat: 修复requestHandler的BUG
This commit is contained in:
@@ -138,13 +138,12 @@ func (s *server) formatError(ctx *gin.Context, err any) exception.IException {
|
|||||||
func (s *server) RequestHandler(uriCfg UriConfig) gin.HandlerFunc {
|
func (s *server) RequestHandler(uriCfg UriConfig) gin.HandlerFunc {
|
||||||
return func(ctx *gin.Context) {
|
return func(ctx *gin.Context) {
|
||||||
var (
|
var (
|
||||||
err error
|
|
||||||
e exception.IException
|
e exception.IException
|
||||||
handleResult any
|
handleResult any
|
||||||
inputValue reflect.Value
|
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{
|
response.SendWithException(ctx, e, &define.ResponseOption{
|
||||||
ContentType: consts.MimeTypeJson,
|
ContentType: consts.MimeTypeJson,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user