add error handling to server discovery