adding a getter for errorOccurred
adding a getter for errorOccurred