def json_fail
import cswap-bend-cli@0.1.0.0/cmd.bend as Cmdimport Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
24# The --json error envelope: stdout, exit 1.
25def json_fail(kind: String, msg: String) -> Out:
26 Out{1, Json.emit_pretty(Json.of_pairs([
27 ("schemaVersion", Json.JNum{"1"}),
28 ("error", Json.of_pairs([("type", Json.JStr{kind}), ("message", Json.JStr{msg})]))])) ++ "\n", ""}