Catalyzes the oxidation of aldehydes to the corresponding carboxylate by coupling the reaction to the reduction of dioxygen to hydrogen peroxide. Substrates include glyoxal and other aldehydes (By similarity). Involved in disease resistance against the grapevine powdery mildew E.necator. Is sufficient to confer disease resistance to E.necator (PubMed:20512385, PubMed:23090239). Can produce hydrogen peroxide in response to E.necator infection, and this may directly play a role in the defense mechanism during plant-pathogen interactions (PubMed:23090239). an aldehyde + H2O + O2 = a carboxylate + H(+) + H2O2 Induced by infection by the grapevine powdery mildew E.necator.