Thanks for using justanswer. This is Leela and I will help you with the question today.
The error message you are getting is related to communication with yahoo server and not with your account. I guess you are trying to use yahoo app. Can you please try to open a Web browser and go to mail.yahoo.com website and login and see if you can login to your yahoo mail or not.
Please let me know how things go?
If you still face same problem, if possible you can try on another device and check.