Skip to content

fix(opencode): display proper session import errors#36258

Open
OpeOginni wants to merge 1 commit into
anomalyco:devfrom
OpeOginni:fix/better-import-error
Open

fix(opencode): display proper session import errors#36258
OpeOginni wants to merge 1 commit into
anomalyco:devfrom
OpeOginni:fix/better-import-error

Conversation

@OpeOginni

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #36231

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • Properly map errors from opencode import [file] command, rather than always going for the "NotFound error"

How did you verify your code works?

  • Typecheck passes
  • Added in extra testcase to try out 3 different error cases, NotFound, PermissionDenied, and any other FS native error we treat as an issue with parsing the JSON file.

Screenshots / recordings

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@OpeOginni

Copy link
Copy Markdown
Contributor Author

Testing Case

  • Export a session
  • Remove a comma making the JSON invalid
  • Try to import that existing session

@OpeOginni OpeOginni changed the title fix(opencode): map proper session import errors fix(opencode): display proper session import errors Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import: misleading error 'File not found' when JSON is malformed or truncated

1 participant