diff --git a/src/codegen/extensions/tools/relace_edit.py b/src/codegen/extensions/tools/relace_edit.py index 06522d67e..0895400b9 100644 --- a/src/codegen/extensions/tools/relace_edit.py +++ b/src/codegen/extensions/tools/relace_edit.py @@ -119,8 +119,8 @@ def relace_edit(codebase: Codebase, filepath: str, edit_snippet: str, api_key: O try: file = codebase.get_file(filepath) except ValueError: - msg = f"File not found: {filepath}" - raise FileNotFoundError(msg) + msg = f"File {filepath} does not exist. Make sure to specify the full filepath from the repo root, e.g. `a/b/c.tsx`." + return RelaceEditObservation(status="error", error=msg, filepath=filepath) # Get the original content original_content = file.content