Skip to content

Commit 6162ca1

Browse files
committed
fix: edit impl - catch error status, not error
1 parent 7fabd29 commit 6162ca1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

gui/src/util/clientTools/editImpl.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ export const editToolImpl: ClientToolImpl = async (
3535
toolCallId,
3636
filepath: firstUriMatch,
3737
})
38-
.catch(() => {
39-
void extras.dispatch(
40-
handleEditToolApplyError({
41-
toolCallId,
42-
}),
43-
);
38+
.then((res) => {
39+
if (res.status === "error") {
40+
void extras.dispatch(
41+
handleEditToolApplyError({
42+
toolCallId,
43+
}),
44+
);
45+
}
4446
});
4547
return {
4648
respondImmediately: false,

0 commit comments

Comments
 (0)