Minor refactoring of error for future dialog