Connectivity is one of those things that rely on various Real World™ coincidences, like being within range of a Wi-Fi hotspot, and your signal not being drowned by another Wi-Fi signal on the same channel. It is therefore guaranteed that at times, it will fail.
Since you say that "there are no errors", this means that the error is handled somewhere, somehow, perhaps in code that you have no control over. However, the fact that the error gets handled does not mean that there is no disruption in the communication. If you had a constant stream of data flowing between client and server, there would be a gap in the continuity of the data at that moment. The transmission may have been retried, and succeeded, but there was a delay. If you find delays, and you are troubleshooting them, you do want to know their cause. Therefore, these log messages are important.
So, you need to get used to them, and learn to ignore them until the time comes one day when you will be troubleshooting something connectivity related, at which point you will learn to also love them.
To conclude: "Connection error" toasts are not very helpful, because in a real-world usage scenario, they would be popping up all the time. Allowing the errors to be logged is probably the only thing you can do, and probably also the best.