ENH: Add error_prefix option to factory function