Under what circumstances should a server.ToolHandlerFunc
return a non-nil error?
#294
Unanswered
williammartin
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hmm, great question. I think that you basically never want to return an error (as you said). The only cases where I could imagine that you do want to return an actual error is if something is absolutely fundamentally broken / wrong (e.g. unrelated to the tool invocation, but something server infrastructure). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As per the spec:
The straightforward reading of this is that tools should only ever return valid results that may or may not contain an error. However, the
server.ToolHandlerFunc
returnserror
as second value, which gets translated into anINTERNAL_ERROR
.Under what circumstances should a tool return a non-nil
error
?Beta Was this translation helpful? Give feedback.
All reactions