Whats the best way of converting an option to a failure?
A library (Confect) is returning
Obviously I could do
Option<DatabaseGetResult>. I would like to convert that to a failure.Obviously I could do
if (Option.none(result)) { return Effect.fail(...) } but there's already a Option.getOrThrow and I guess I don't understand why there's not a Option.getOrFail? Is there a reason for this?