Better error handling for network clients.