passing error to props when there's a xhr error