diff --git a/router/meta.go b/router/meta.go index 93d9204..b821f86 100644 --- a/router/meta.go +++ b/router/meta.go @@ -7,7 +7,11 @@ // Date : 2024-07-20 21:40 package router -// Meta 接口的元信息 +// Meta 接口的元信息, 主要包含如下信息: +// +// uri: 接口路由(不包含group前缀) +// +// method: 请求方法: get/post 等 // // Author : go_developer@163.com<白茶清欢> // diff --git a/router/register.go b/router/register.go index 2f3ca60..5cce58f 100644 --- a/router/register.go +++ b/router/register.go @@ -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 } }