Export GetError and SetError methods (#753)
Exported GetError and SetError. Fixes #64 Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b4f957ff3c
commit
13488f7da1
1 changed files with 8 additions and 8 deletions
|
|
@ -2124,7 +2124,7 @@ func TestToolErrorMiddleware(t *testing.T) {
|
|||
res, err := h(ctx, method, req)
|
||||
if err == nil {
|
||||
if ctr, ok := res.(*CallToolResult); ok {
|
||||
middleErr = ctr.getError()
|
||||
middleErr = ctr.GetError()
|
||||
}
|
||||
}
|
||||
return res, err
|
||||
|
|
@ -2161,7 +2161,7 @@ func TestToolErrorMiddleware(t *testing.T) {
|
|||
t.Fatal("want error, got none")
|
||||
}
|
||||
// Clients can't see the error, because it isn't marshaled.
|
||||
if err := res.getError(); err != nil {
|
||||
if err := res.GetError(); err != nil {
|
||||
t.Fatalf("got %v, want nil", err)
|
||||
}
|
||||
if middleErr != errTestFailure {
|
||||
|
|
|
|||
Loading…
Reference in a new issue