refactor searchByPhone to have err