What about using tuples as a poor man’s Either, returning an error tuple in a catch all function clause and using the approach you described here?