However, once the treaty was made, it was made. When the leaders of Israel realized their mistake, they said,
Josh 9:19 “We have sworn to them by YHWH, the God of Israel, and now we may not touch them.20 This we will do to them: let them live, lest wrath be upon us, because of the oath that we swore to them.”
Although the Israelites had erred, rather than reneging on the treaty to try and "fix" their error, which would have compounded the error by the breaking of their oath, they kept to their oath.
I'm reminded of the position many Christians take toward marriage/divorce/remarriage, which claims that when a person realizes s/he has [re]married unscripturally, and has taken an improper oath to be married, that person should divorce the new spouse and remain single. This position contradicts the example set by Israel with their improper oath.
Does Israel's example have bearing on the marriage/divorce/remarriage issue? I'm not smart enough to say, but I do find it to make for an interesting parallel.