Skip to content

fix(app): detect session-not-found across legacy error shapes - #48013

Open
CannonRS wants to merge 1 commit into
anomalyco:devfrom
mQorva:detect-session-errors
Open

fix(app): detect session-not-found across legacy error shapes#48013
CannonRS wants to merge 1 commit into
anomalyco:devfrom
mQorva:detect-session-errors

Conversation

@CannonRS

@CannonRS CannonRS commented Sep 8, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #48012

Type of change

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

What does this PR do?

isSessionNotFoundError and isLocalSessionNotFoundError now also recognise
session-not-found errors that arrive through other serialisation shapes, not just
the exact V1 tagged form:

  • string errors whose text contains the not-found message;
  • objects with name: "NotFoundError" whose data.message equals the message;
  • any serialised object whose message includes the not-found text.

The existing exact-shape checks (Error.message ===, _tag === "SessionNotFoundError")
are preserved, so current behaviour is unchanged where it already worked.

How did you verify your code works?

  • bun typecheck in packages/app: clean.
  • The change is a pure widening of the two predicate functions; no call-site
    changes. (A focused test for the new shapes can be added if the maintainer
    wants one; none is included to keep the diff minimal.)

Screenshots / recordings

N/A — not a UI change.

Fork

Checklist

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

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.

Session-not-found errors are only detected in the exact V1 shape, other wrappers are missed

1 participant