Merge add and delete attr methods. Handle error properly