Use `try..except` to handle network error

title says it all