[task] renamed error message classes and refactored use of them