save code
This commit is contained in:
parent
e40475cdb1
commit
851de1b3ef
@ -7,7 +7,11 @@
|
||||
// Date : 2024-07-20 21:40
|
||||
package router
|
||||
|
||||
// Meta 接口的元信息
|
||||
// Meta 接口的元信息, 主要包含如下信息:
|
||||
//
|
||||
// uri: 接口路由(不包含group前缀)
|
||||
//
|
||||
// method: 请求方法: get/post 等
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
|
@ -163,10 +163,10 @@ func registerUri(uriConfig *UriConfig, methodValue reflect.Value, middlewareList
|
||||
}
|
||||
err := errData.Interface()
|
||||
if e, ok := err.(exception.IException); ok {
|
||||
response.SendWithException(ctx, e, businessData)
|
||||
response.SendWithException(ctx, e, map[string]any{"business_data": businessData})
|
||||
return
|
||||
} else {
|
||||
response.SendWithException(ctx, exception.NewFromError(-1, errData.Interface().(error)), businessData)
|
||||
response.SendWithException(ctx, exception.NewFromError(-1, errData.Interface().(error)), map[string]any{"business_data": businessData})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user