replaced error array with ErrorArray type