Added networkError method that checks for various network errors