handling network errors correctly (temporary and permanent network errors)