Improved error handling for applying diffs.