Change getError in getErrorMessages