def cut_error
import cswap-bend-cli@0.1.0.0/rpcmsg.bend as Rpcmsgimport Base
196# The text after the first `error: ` in `s`, else `whole`.
197def cut_error(s: String, +whole: String) -> String:
198 match s:
199 case SNil{}:
200 whole
201 case SCon{+c, +t}:
202 cut_pick(String.starts_with(s, "error: "), String.drop(s, 7n), cut_error(t, whole))