Make all error handling tests pass