applying corrections do the method getErrorMessage
changing errors array to static