glean/error
Types
pub type FinishReason {
Stop
Length
ContentFilter
ToolCalls
FinishError
Other(String)
}
Constructors
-
Stop -
Length -
ContentFilter -
ToolCalls -
FinishError -
Other(String)
pub type GleanError {
ProviderError(
provider: String,
model: String,
status: Int,
message: String,
)
ToolNotFound(tool_name: String)
ToolExecutionError(
tool_name: String,
tool_call_id: String,
reason: String,
)
ToolInputValidationError(
tool_name: String,
tool_call_id: String,
errors: List(ValidationError),
)
OutputValidationError(errors: List(ValidationError))
MaxStepsExceeded(
max_steps: Int,
steps_taken: Int,
messages: List(message.Message),
)
JsonParseError(input: String, message: String)
Timeout(after_ms: Int)
ConfigError(message: String)
}
Constructors
-
ProviderError( provider: String, model: String, status: Int, message: String, )Provider returned a non-200 status or network failure
-
ToolNotFound(tool_name: String)Tool call referenced a tool name not in the toolset
-
ToolExecutionError( tool_name: String, tool_call_id: String, reason: String, )Tool execution returned an error
-
ToolInputValidationError( tool_name: String, tool_call_id: String, errors: List(ValidationError), )Tool input failed schema validation
-
OutputValidationError(errors: List(ValidationError))Output validation failed
-
MaxStepsExceeded( max_steps: Int, steps_taken: Int, messages: List(message.Message), )Max steps exceeded in the agent loop The conversation so far, including every tool call and result, so it can be inspected or resumed with
run.generate_messages. -
JsonParseError(input: String, message: String)JSON parsing failed
-
Timeout(after_ms: Int)Request timed out
-
ConfigError(message: String)Configuration error at agent build time
pub type ValidationError {
ValidationError(path: List(String), message: String)
}
Constructors
-
ValidationError(path: List(String), message: String)
Values
pub fn to_string(error: GleanError) -> String
Convert a GleanError to a human-readable string.