Adjusts #3955, better error message

This commit is contained in:
Mario Zechner
2026-04-30 12:33:02 +02:00
parent 43ee9b77ed
commit ebdf3cf451
2 changed files with 2 additions and 2 deletions

View File

@@ -414,7 +414,7 @@ export async function computeEditsDiff(
await access(absolutePath, constants.R_OK);
} catch (error: unknown) {
const errorMessage = error instanceof Error && "code" in error ? `Error code: ${error.code}` : String(error);
return { error: `Could not write file: ${path}. ${errorMessage}.` };
return { error: `Could not edit file: ${path}. ${errorMessage}.` };
}
// Read the file

View File

@@ -347,7 +347,7 @@ export function createEditToolDefinition(
if (signal) {
signal.removeEventListener("abort", onAbort);
}
reject(new Error(`Could not write file: ${path}. ${errorMessage}.`));
reject(new Error(`Could not edit file: ${path}. ${errorMessage}.`));
return;
}