California often leads the nation on the environment, consumer protection, social equality and more. Usually the rest of the country eventually catches up, but sometimes other states just laugh, and rightly so. They’re laughing now at news that a judge ordered health safety labels on coffee. A good idea has gone awry, and lawmakers ought to take a serious look at fixing it.

For those lucky few who had better things to do this week than follow the latest legal lunacy, a recap.

In 1986, California voters passed Proposition 65, the Safe Drinking Water and Toxic Enforcement Act. Its main goal was to keep dangerous chemicals out of drinking water. It also requires businesses to warn consumers about exposure to chemicals that can cause cancer or harm people’s health in other ways.

The state keeps an official list of the dangerous chemicals subject to Prop. 65, and it includes acrylamide, a suspected carcinogen. The logic isn’t hard from there. Acrylamide is on the list. Coffee has acrylamide. Therefore, coffee needs a warning label. The judge issued his ruling.

Half of the defendants, including 7-Eleven and BP West Coast Products, must have seen the writing on the wall. They settled their role in the case before the ruling and paid hefty penalties.

Don’t blame the judge for following the law. Blame Prop. 65, the voters who passed it and the lawyers who profit from these lawsuits. Prop. 65 rewards litigious groups that pursue these cases. The group that demanded coffee labels has been filing such suits for more than a decade.

Coffee isn’t tobacco. Drinking a cup or three throughout the day isn’t the same as smoking a pack of cigarettes. Yes, some research suggests that massive doses of acrylamide thousands of times greater than what humans consume increase cancer risk in rats. Some research also suggests that coffee drinkers enjoy a host of health benefits including reduced risk of Parkinson’s disease, diabetes and several forms of cancer. Coffee apparently is both good and bad for cancer.

Acrylamide occurs naturally as a result of the roasting process. It’s also in bread, potato chips, almonds, fried chicken and other foods. Perhaps every toaster could just brown the warning label onto bread.

Among the nearly 1,000 items on the state’s chemical list are some surprises. There’s marijuana smoke in a state that has had medical marijuana for years, wood dust and leather dust, testosterone and the dreaded salted fish — Chinese style. Even midazolam hydrochloride made the list. It’s a common sedative that anesthesiologists across the country give to children and adults every day.

The original backers of Prop. 65 might not have intended a coffee warning, but opponents predicted this sort of thing. “Proposition 65 won’t produce useful warnings,” they cautioned voters in 1986, “It requires ‘warnings’ on millions of ordinary and safe items. We won’t know what products really are dangerous anymore. The warnings we really need will get lost in lots of warnings we don’t need.”

That’s the real problem with the coffee label. Its triviality and scientific uncertainty encourage consumers to disregard it. When people see warning signs everywhere, they start to tune them out. That in turn undermines the credibility of the whole Prop. 65 labeling system.