Cancel indexing if it errors, instead of crashing