If the error is important (not a typo or a grammatical error), e.g. statistical mistake, then the editors of the journal or book should be made aware of it. If the article is in a journal, the editors can then contact the authors and they can publish an erratum, which is not uncommon in academic journals.