mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-11 11:03:22 +00:00
return tool errors properly
This commit is contained in:
parent
37082b2176
commit
4132fcc1b2
1 changed files with 6 additions and 1 deletions
|
|
@ -48,7 +48,12 @@ export namespace Tool {
|
|||
log.error("error", {
|
||||
msg: e.toString(),
|
||||
});
|
||||
return "An error occurred: " + e.toString();
|
||||
return {
|
||||
metadata: {
|
||||
error: true,
|
||||
},
|
||||
output: "An error occurred: " + e.toString(),
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue