Repository navigation
Commit 6360b09
committed
fix(tools): report EditFile path escapes as tool errors, not crashes
EditFileTool caught only FileNotFoundError around the environment read,
so the resolver's ValueError for a path escaping the working directory
propagated and failed the whole invocation, while ReadFile and WriteFile
already returned it to the model as a recoverable error dict. Catch
ValueError alongside FileNotFoundError. This also fixes the same gap for
LocalEnvironment, whose resolver has always raised here.
Review follow-up to #7700.1 parent 814ad2e commit 6360b09
2 files changed
Lines changed: 30 additions & 0 deletions
File tree
- src/google/adk/tools/environment
- tests/unittests/tools/environment
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
0 commit comments