def retry.fail

bend-kit-http@0.38.2.0 · http.bend:4524

import bend-kit-http@0.38.2.0/http.bend as Http
import Base

4524# A refused connect or a timeout may clear; any other error would repeat.
4525def retry.fail(e: Err) -> Result<&1, &1, Err, Res> & Maybe<&2, String>:
4526  match e:
4527    case ErrConnect{code, why}:
4528      (Fail{ErrConnect{code, why}}, Some{""})
4529    case ErrTimeout{}:
4530      (Fail{ErrTimeout{}}, Some{""})
4531    case other:
4532      (Fail{other}, None{})

Uses (7)

Used by (1)