Support error handling with Either for namesMaching