Use ErrorFactory consistently

Repo now generates all its error objects through the ErrorFactory.