[PR #5512] fix: handle missing share files in Session.getShare and ShareNext.get #11444

Closed
opened 2026-02-16 18:16:17 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5512

State: closed
Merged: No


Summary

  • Fix unhandled promise rejections caused by Storage.read throwing NotFoundError when checking share status for unshared sessions
  • The TUI calls these functions during sync, resulting in ~1 error/second in the logs

Changes

  • Add .catch(() => undefined) to Session.getShare() and ShareNext.get() to gracefully handle missing share files
  • Consistent with similar patterns elsewhere in the codebase (e.g. project.ts:95, summary.ts:181)
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5512 **State:** closed **Merged:** No --- ## Summary - Fix unhandled promise rejections caused by `Storage.read` throwing `NotFoundError` when checking share status for unshared sessions - The TUI calls these functions during sync, resulting in ~1 error/second in the logs ## Changes - Add `.catch(() => undefined)` to `Session.getShare()` and `ShareNext.get()` to gracefully handle missing share files - Consistent with similar patterns elsewhere in the codebase (e.g. `project.ts:95`, `summary.ts:181`)
yindo added the pull-request label 2026-02-16 18:16:17 -05:00
yindo closed this issue 2026-02-16 18:16:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11444