setting state back to idle when catching a loading error

fixed #35