OxL Reference

data SessionError

Why a session could not be created or ended (the session store is the cluster's replicated key-value store).

Example:

oxl✓ checked in CI
use std.rpc { createSession, SessionError }
use std.time { Duration }

fn main() io, db {
  // a ttl of zero is outside 1 ms .. 30 days
  match createSession("u1", ["Admin"], Duration.ofMillis(0)) {
    str _ => print("created")
    SessionError e => print("refused")
  }
}
Output
refused
@error pub(api) data SessionError

Since. 1.0.0-beta

Fields

pub(api) msg: str

Why the session store refused the call (for example a ttl outside 1 ms .. 30 days, or a store that cannot be reached).

Defined in: std/rpc/rpc.oxl:370

See also