libplanet
libplanet copied to clipboard
Make `ITransport.SendMessageAsync()` fail more gracefully.
Currently, the method can throw too many different types of Exceptions, and Exception type is used as elaborate flow control, which is considered an anti-pattern in general. Unless there is a critical failure, callers do not really need to know how ITransport.SendMessageAsync() failed, but are only interested in its return value. It would be better to suppress Exceptions inside ITransport.SendMessageAsync() and return whatever Messages it managed to get as replies. 😶
Also, at the moment, all those Exception types used for flow control isn't even documented in ITransport. 🙄
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.