[refactor] dedicated InvalidArgumentsException for HeaderFactory too