Catching xml parsing error and returning failure in callback