Skip to content

Conversation

@cleyesode
Copy link
Contributor

Summary

Restores original `formatError()` usage in the tool-executor to maintain consistency with the project's error handling pattern.

Problem

The original implementation removed `formatError()` from error messages, which:

  • Created inconsistency with `message-handler.ts`
  • Broke error handling for object errors without message properties
  • Could cause issues with `displayToolResult()` which expects the "Error: " prefix

Solution

Restores `formatError()` import and usage for both validation and execution errors.

Changes

  • Add back `formatError` import from `@/utils/error-formatter`
  • Use `formatError()` for validation error messages: `Validation failed: ${formatError(error)}`
  • Use `formatError()` for execution error messages: `Error: ${formatError(error)}`

Testing

All 10 existing tests continue to pass.

Files Changed

  • `source/hooks/chat-handler/conversation/tool-executor.tsx` (+1, -1)

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant