Skip to content

Handle missing session IDs in directory session route without crashing #210

Description

@OpenCodeEngineer

Implement graceful recovery when opening /:dir/session/:id for non-existent session IDs.

Acceptance criteria:

  • Detect session-not-found API errors via reusable helper in packages/app/src/utils/server-errors.ts.
  • Add helper tests in packages/app/src/utils/server-errors.test.ts.
  • Update packages/app/src/pages/directory-layout.tsx so sync.session.sync(id) catches only session-not-found for the current param id, shows request-failed toast using formatServerError, navigates to /:dir/session with replace: true, and swallows that case.
  • Re-throw all other errors.
  • Validate with:
    • bun test src/utils/server-errors.test.ts
    • bun typecheck (from packages/app).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions