Rename displayError and clearError to be more generic