def test_invalid_operation_type(editor: ArtifactEditorToolSpec):
    """Test error handling for invalid operation types."""
    editor.create_artifact(name="John", age=30)

    patch = JsonPatch(
        operations=[PatchOperation(op="invalid_op", path="/name", value="test")]
    )

    with pytest.raises(ValueError, match="Unknown operation"):
        editor.apply_patch(patch)
Test error handling for invalid operation types.
llama-index-integrations/tools/llama-index-tools-artifact-editor/tests/test_artifact_editor.py