change varients to variants in domain; refactor exceptionResolver