def scope_error
import cswap-bend-cli@0.1.0.0/usage/req.bend as Reqimport 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"))