fix(desktop): fix error handling by adding errorName function to identify NotFoundError rather than statusCode#17591
Merged
nexxeln merged 3 commits intoanomalyco:devfrom Mar 18, 2026
Conversation
…identify NotFoundError rather than statusCode
6 tasks
nexxeln
approved these changes
Mar 18, 2026
AbhishekChorotiya
pushed a commit
to AbhishekChorotiya/opencode
that referenced
this pull request
Mar 19, 2026
…tify NotFoundError rather than statusCode (anomalyco#17591)
AvatarGanymede
pushed a commit
to AvatarGanymede/opencode-dev
that referenced
this pull request
Mar 19, 2026
…tify NotFoundError rather than statusCode (anomalyco#17591)
demostanis
pushed a commit
to demostanis/opencode
that referenced
this pull request
Mar 19, 2026
…tify NotFoundError rather than statusCode (anomalyco#17591)
raf1hh
pushed a commit
to raf1hh/opencode
that referenced
this pull request
Mar 20, 2026
…tify NotFoundError rather than statusCode (anomalyco#17591)
demostanis
pushed a commit
to demostanis/opencode
that referenced
this pull request
Mar 20, 2026
…tify NotFoundError rather than statusCode (anomalyco#17591)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #17590
Type of change
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