Updated error-factory usage