New getErrorMessages method