Webhooks.send.again: def of bend-kit-webhooks@0.11.0.1 Import: import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooks Lines 442-451 of bend-kit-webhooks@0.11.0.1/webhooks.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&start_line=442&end_line=451 import Base import bend-kit-http@0.38.1.1/http.bend as Http # A timeout, a refused connect, 408, 429, or any 5xx may clear. def send.again(r: Result<&1, &1, Http.Err, Http.Res>) -> Result<&1, &1, Http.Err, Http.Res> & Maybe<&2, String>: match r: case Fail{e}: Http.retry.judge(True{}, Fail{e}) case Done{res}: Http.Res{+status, +headers, body} = res +again = Bool.or(Http.retry.status(status), U32.is_eq((status / 100 : U32), 5)) (Done{Http.Res{status, headers, body}}, Bool.pick(Maybe<&2, String>, again, Some{Http.header(headers, "retry-after")}, None{})) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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=Base/base.bend&name=U32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Err https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Res https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=header https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=retry.judge https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=retry.status