add proper error messages when editing links