handle return codes from the set/delete apis