err<T> static method
Asserts result is a Err and returns its problem.
Implementation
static Problem err<T>(Result<T> result, {String? reason}) => result.match(
ok: (T value) =>
throw AuthAssertionError(reason ?? 'expected Err but got Ok($value)'),
err: (Problem problem) => problem,
);