WASHINGTON — In politics, it is sometimes better to be lucky than good. Republicans and Democrats, and groups sympathetic to each, spend millions on sophisticated technology to gain an advantage.

They do it to exploit vulnerabilities and to make their own information secure. But sometimes, a simple coding mistake can lay bare documents and data that were supposed to be concealed from the prying eyes of the public.

Such an error by the Republican Governors Association recently resulted in the disclosure of exactly the kind of information that political committees given tax-exempt status usually keep secret, namely their corporate donors and the size of their checks. That set off something of an online search war between the association and a Washington watchdog group that spilled other documents, Democratic and Republican, into the open.

The documents, many of which the Republican officials have since removed from their website, showed that many of America’s most prominent companies, from Aetna to Walmart, had poured millions of dollars into the campaigns of Republican governors since 2008. One document listed 17 corporate “members” of the governors association’s secretive 501(c)(4), the Republican Governors Public Policy Committee, which is allowed to shield its supporters from the public.