fix(edit) diff: add error check