Add test for error case during creation of new model; make it pass