added integration tests for errors