Documentation
¶
Overview ¶
Package toolerr maps domain errors onto the agent-facing error object shared by MCP tools and the flowbot CLI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessExit ¶
ProcessExit is the CLI process status for a tool error code. Retryable provider_error is 6. Every other unknown code is 1.
Types ¶
type ToolError ¶
type ToolError struct {
Code string
Message string
Retryable bool
Hint string
RetryAfterMS int64
Field string
JobID string
Confirmation map[string]any
}
ToolError is the machine-readable failure stored at error in MCP structuredContent and on the CLI stderr envelope.
func ToToolError ¶
ToToolError maps err onto the shared tool error object. Plain errors and ErrInternal become code internal with a fixed message. ErrInvalidArgument keeps the cause text from types.ClientSafeDomainMessage.
Click to show internal directories.
Click to hide internal directories.