added integration test for model error handling