Hello and sorry about the error.
Which version of Thunderbird and gContactSync are you using?
You can find the Thunderbird version in Help -> About and the version of gContactSync under Tools -> Add-ons
Also, does this happen every time you delete a contact, or just in certain address books or mailing lists?