Skip to content

fix(desktop): fix error handling by adding errorName function to identify NotFoundError rather than statusCode#17591

Merged
nexxeln merged 3 commits intoanomalyco:devfrom
OpeOginni:fix/desktop-pty-error-catching
Mar 18, 2026
Merged

fix(desktop): fix error handling by adding errorName function to identify NotFoundError rather than statusCode#17591
nexxeln merged 3 commits intoanomalyco:devfrom
OpeOginni:fix/desktop-pty-error-catching

Conversation

@OpeOginni
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #17590

Type of change

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

What does this PR do?

Uses the error name returned to determine if the server got a 404 related to a PTY id, previously a check for status code was used, but the SDK does not return status code rather an error name and message, this can be see in the video of the issue, where the logs of the desktop shows it.

This PR changes the function to check for an error name of "NotFoundError" which is what gets retured and allows the terminal instance to be initialised and ends up being responsive.

How did you verify your code works?

Tested on my local desktop dev environment

Screenshots / recordings

Checklist

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

…identify NotFoundError rather than statusCode
@OpeOginni OpeOginni changed the title fix(desktop): improve error handling by adding errorName function to identify NotFoundError rather than statusCode fix(desktop): fix error handling by adding errorName function to identify NotFoundError rather than statusCode Mar 17, 2026
@nexxeln nexxeln merged commit 976aae7 into anomalyco:dev Mar 18, 2026
10 checks passed
AbhishekChorotiya pushed a commit to AbhishekChorotiya/opencode that referenced this pull request Mar 19, 2026
AvatarGanymede pushed a commit to AvatarGanymede/opencode-dev that referenced this pull request Mar 19, 2026
demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 19, 2026
raf1hh pushed a commit to raf1hh/opencode that referenced this pull request Mar 20, 2026
demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 20, 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.

Terminal Does not properly auto-recover after restarting Desktop

2 participants