replace anonymous Error with monapt.MatchError