async fn run_handler(
module_id: Option<ModuleInstanceId>,
method: &str,
handler: impl Future<Output = Result<Value, ApiError>>,
) -> Result<Value, ApiError>Expand description
Runs an API endpoint handler, turning a panic into an error response for the caller that triggered it.
Iroh API requests run on the root task group, so an escaping panic would trip the task group’s panic guard and shut the whole guardian down. The jsonrpsee path contains handler panics the same way.