def body.ok

bend-kit-llm@0.13.0.1 · llm.bend:289

import bend-kit-llm@0.13.0.1/llm.bend as Llm
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import bend-kit-encoding@0.5.0.0/encoding.bend as Enc

289def body.ok(good: Bool, +status: U32, b: Bytes.Bytes) -> Result<&1, &1, Err, Bytes.Bytes>:
290  match good:
291    case True{}:
292      Done{b}
293    case False{}:
294      Fail{ErrApi{status, Enc.utf8.decode(b)}}

Uses (6)

Used by (1)