OxL Reference

method Response.refuse

A short-circuit answer: the call fails with e and the handler does not run (if next is not called).

Example:

oxl✓ checked in CI
fn main() io {
  let r = Response.refuse(AccessDenied{})
  print("{r.failed()} {r.passed}")
}
Output
true false
pub(api) static fn refuse(e: NetError) -> Response

Complexity. O(1).

Since. 1.0.0-beta

Parameters

NameType
eNetError

Returns

Response

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/rpc.oxl:464

See also