Browse Source

change error message to something more descriptive (#1790)

Robert Brennan 1 year ago
parent
commit
c604f8fcd2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      opendevin/runtime/server/files.py

+ 3 - 1
opendevin/runtime/server/files.py

@@ -57,7 +57,9 @@ async def read_file(path, workdir, start=0, end=-1) -> Observation:
     try:
         whole_path = resolve_path(path, workdir)
     except PermissionError:
-        return ErrorObservation(f'Malformed paths not permitted: {path}')
+        return ErrorObservation(
+            f"You're not allowed to access this path: {path}. You can only access paths inside the workspace."
+        )
 
     try:
         with open(whole_path, 'r', encoding='utf-8') as file: