A mother who lost custody of her children based on a finding of intoxication, when in fact she was only using prescription anti-anxiety medication, will get a second chance to prove she did not neglect or abuse them.

A state appeals court ruled on Tuesday in a published opinion that a family court judge erred in discarding evidence that may have been “fatal” to the state’s case.