error handling deleting notes