testing/rpc_round_trip.ts view source
(method: string, status: number, body: unknown, principal: AuthPrincipal): void import {assert_rpc_authenticated} from '@fuzdev/fuz_app/testing/rpc_round_trip.js'; Guard against a refusal that says the call carried no valid credential
when it carried one (is_unauthenticated_refusal). The round-trip sends
every non-public method a live credential its auth admits, so such a 401
means the backend failed to authenticate it — most often because an earlier
call destroyed it (a self-delete, a revoke-all), which would turn every
later method's coverage into a vacuous refusal. A public method may still
answer 401 (a login with a wrong password), and so may a handler refusing
an authenticated call with a reason of its own (invalid_credentials).
method
the RPC method name
stringstatus
the HTTP status
numberbody
the parsed response body (or raw text when not JSON)
unknownprincipal
the principal the call was sent as
returns
void