Catch error when trying to delete provider