[PR #8116] fix: prevent [object Object] error display in console output #12624

Closed
opened 2026-02-16 18:17:31 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8116

State: closed
Merged: Yes


Fix multiple locations where objects were being directly passed to
console.error/console.log, which causes [object Object] to be displayed
instead of meaningful error messages.

Changes:

  • packages/opencode/src/index.ts: Properly convert error to string
  • packages/opencode/src/cli/cmd/github.ts: Convert error objects to strings
  • packages/opencode/src/cli/cmd/debug/file.ts: Use JSON.stringify for objects
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8116 **State:** closed **Merged:** Yes --- Fix multiple locations where objects were being directly passed to console.error/console.log, which causes [object Object] to be displayed instead of meaningful error messages. Changes: - packages/opencode/src/index.ts: Properly convert error to string - packages/opencode/src/cli/cmd/github.ts: Convert error objects to strings - packages/opencode/src/cli/cmd/debug/file.ts: Use JSON.stringify for objects
yindo added the pull-request label 2026-02-16 18:17:31 -05:00
yindo closed this issue 2026-02-16 18:17:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12624