Usage.fetch.after: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/usage.bend as Usage Lines 115-121 of cswap-bend-cli@0.1.0.0/usage.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/usage.bend&start_line=115&end_line=121 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/usage/req.bend as UReq import cswap-bend-cli@0.1.0.0/usage/cred.bend as UCred import cswap-bend-cli@0.1.0.0/usage/gate.bend as UGate # 401 on an inactive account with a refresh token: refresh once, retry once. def fetch.after(r: Result<&2, &2, UReq.Err, Json.Json>, gate: UGate.Gate, +cred: String, +o: Json.Json, +active: Bool, +now: U32, +off: U32, upd: Maybe<&2, String>) -> IO(Fetched): match r: case Done{d}: done(out.ok(d, now, off), upd) case Fail{+e}: fail.refresh(is_401(e) && Bool.not(active) && UCred.has_refresh(o), e, gate, cred, now, off, upd) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/cred.bend&name=has_refresh https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/gate.bend&name=Gate https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/req.bend&name=Err https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage.bend&name=Fetched https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage.bend&name=done https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage.bend&name=fail.refresh https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage.bend&name=is_401 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage.bend&name=out.ok