This is an automated email from the ASF dual-hosted git repository.
kumfo pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/test by this push:
new 82d7445e fix: embed controller add error return
82d7445e is described below
commit 82d7445e62321a6cc859df15007a486b5a70b5ad
Author: kumfo <[email protected]>
AuthorDate: Thu Aug 22 16:13:44 2024 +0800
fix: embed controller add error return
---
internal/controller/embed_controller.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/internal/controller/embed_controller.go
b/internal/controller/embed_controller.go
index a61bd68c..eb54f1a6 100644
--- a/internal/controller/embed_controller.go
+++ b/internal/controller/embed_controller.go
@@ -43,10 +43,10 @@ func NewEmbedController() *EmbedController {
func (c *EmbedController) GetEmbedConfig(ctx *gin.Context) {
resp := make([]*plugin.EmbedConfig, 0)
- _ = plugin.CallEmbed(func(embed plugin.Embed) (err error) {
+ err := plugin.CallEmbed(func(embed plugin.Embed) (err error) {
resp, err = embed.GetEmbedConfigs(ctx)
- return nil
+ return err
})
- handler.HandleResponse(ctx, nil, resp)
+ handler.HandleResponse(ctx, err, resp)
}