Error refactor.