Better network error handling