Phase errors and their effect on undulator radiation properties