diff --git a/operation/issue/issue.go b/operation/issue/issue.go index 346d496..00bfa15 100644 --- a/operation/issue/issue.go +++ b/operation/issue/issue.go @@ -145,7 +145,7 @@ func CreateIssueFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolR Body: body, }) if err != nil { - return to.ErrorResult(fmt.Errorf("create %v/%v/issue err", owner, repo)) + return to.ErrorResult(fmt.Errorf("create %v/%v/issue err: %v", owner, repo, err)) } return to.TextResult(issue) @@ -174,7 +174,7 @@ func CreateIssueCommentFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.Ca } issueComment, _, err := gitea.Client().CreateIssueComment(owner, repo, int64(index), opt) if err != nil { - return to.ErrorResult(fmt.Errorf("create %v/%v/issue/%v/comment err", owner, repo, int64(index))) + return to.ErrorResult(fmt.Errorf("create %v/%v/issue/%v/comment err: %v", owner, repo, int64(index), err)) } return to.TextResult(issueComment) diff --git a/operation/repo/repo.go b/operation/repo/repo.go index 0ec96ea..13cefc2 100644 --- a/operation/repo/repo.go +++ b/operation/repo/repo.go @@ -148,7 +148,7 @@ func ForkRepoFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResu } _, _, err := gitea.Client().CreateFork(user, repo, opt) if err != nil { - return to.ErrorResult(fmt.Errorf("fork repository error %v", err)) + return to.ErrorResult(fmt.Errorf("fork repository error: %v", err)) } return to.TextResult("Fork success") }