Skip to content

fix(chat): normalize session creation errors - #1006

Closed
wunitb wants to merge 1 commit into
dataelement:mainfrom
wunitb:fix/group-session-error-message
Closed

fix(chat): normalize session creation errors#1006
wunitb wants to merge 1 commit into
dataelement:mainfrom
wunitb:fix/group-session-error-message

Conversation

@wunitb

@wunitb wunitb commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • recursively normalize structured session-creation errors from message, detail, and error envelopes
  • prevent literal [object Object] from reaching Group Chat toasts
  • route Group session creation through the shared error normalizer with an unknown catch boundary

Root cause

The backend already returns structured FastAPI errors such as {"detail":{"code":"...","message":"..."}}. Some runtime/client paths can rethrow an object or place a nested object in Error.message; GroupsPage read error.message directly, so the UI rendered JavaScript object coercion instead of the backend diagnostic. Backend create_group_session and its transaction path are covered and no repository defect blocking valid session creation was reproduced.

Verification

  • frontend contract suite: 124 passed
  • TypeScript + Vite production build: passed
  • focused error tests cover nested objects, malformed Error.message, and [object Object] fallback

Deployment

The branch is rebased onto current upstream main at e190c982. The same change is merged into the deployable fork wunitb/Clawith as b9ba45ec. Upstream merge/deploy is still required before installations tracking dataelement/Clawith receive the fix.

@wunitb
wunitb force-pushed the fix/group-session-error-message branch from 94fdb16 to e190c98 Compare September 1, 2026 05:42
@wunitb

wunitb commented Sep 1, 2026

Copy link
Copy Markdown
Author

Rebased the tested fix onto current main (e190c982). The Group Chat create-session backend path is valid in repository tests; the confirmed defect is UI object coercion hiding the structured backend message. Full frontend contract suite: 124 passed; production build passed. Please merge/deploy to replace COULD NOT CREATE THE SESSION — [OBJECT OBJECT] with the real diagnostic.

@wunitb wunitb closed this Sep 1, 2026
@wunitb
wunitb deleted the fix/group-session-error-message branch September 1, 2026 07:56
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.

1 participant