tinyhumansai/openhuman · error
{name}: {}
Error message
{name}: {} What it means
Uniform error from the emit! macro family: a thread ops call returned a non-success RpcOutcome envelope, and the error string from the outcome is surfaced with the tool name prefix. The concrete failure is whichever ops method the calling tool invoked.
Source
Thrown at src/openhuman/threads/tools.rs:54
.and_then(serde_json::Value::as_str)
.map(str::trim)
.filter(|s| !s.is_empty())
.map(str::to_string)
.ok_or_else(|| anyhow::anyhow!("missing required string argument `{key}`"))
}
/// Deserialize tool args into a request struct with a uniform error.
fn parse_req<T: serde::de::DeserializeOwned>(
args: serde_json::Value,
tool: &str,
) -> anyhow::Result<T> {
serde_json::from_value(args).map_err(|e| anyhow::anyhow!("{tool}: invalid arguments: {e}"))
}
/// Emit a thread ops `RpcOutcome` envelope as a JSON tool result.
macro_rules! emit {
($outcome:expr, $name:literal) => {{
let outcome = $outcome.map_err(|e| anyhow::anyhow!(concat!($name, ": {}"), e))?;
Ok(ToolResult::success(serde_json::to_string(&outcome.value)?))
}};
}
/// List conversation threads.
pub struct ThreadListTool;
#[async_trait]
impl Tool for ThreadListTool {
fn name(&self) -> &str {
"thread_list"
}
fn description(&self) -> &str {
"List conversation threads (id, title, labels, timestamps). Use to find \
a thread id before reading its messages, retitling, or relabeling."
}
View on GitHub (pinned to 7491200858)
Solutions
- Read the embedded outcome error text for the real cause (not-found, permission, persistence)
- Confirm ids (thread_id, message id) reference existing entities
- Retry transient persistence failures once
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/threads/tools.rs:54 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/bffb6aca8afb2a3b.
Report an issue: GitHub.