def scope_error

cswap-bend-cli@0.1.0.0 · usage/req.bend:62

import cswap-bend-cli@0.1.0.0/usage/req.bend as Req
import Base

62# The reference raises on a 403 whose body says the token lacks scope.
63def scope_error(e: Err) -> Bool:
64  match e:
65    case Err{kind, retry, +body}:
66      String.eq(kind, "http-403") && (String.contains(body, "oauth_scope_insufficient") || String.contains(body, "scope requirement"))

Uses (6)

Used by (1)