build distribution for toThrowError refactor