Add error handling
Update test for error handling