Refactoring ErrorsController