save code

This commit is contained in:
2025-01-27 15:07:58 +08:00
parent e40475cdb1
commit 851de1b3ef
2 changed files with 7 additions and 3 deletions

View File

@ -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
}
}