Do not enable offline mode when fetchRoot returns 400/500 (#14053)

Change-Id: I29635982514071e63221a9771d6729da14273ad3