Generalize error and success messages