Skip to main content

Type Alias: CastErrorCode

type CastErrorCode =
| "unavailable"
| "no-session"
| "session-start-failed"
| "load-failed"
| "cast-receiver-fetch"
| "no-castable-media"
| "invalid-argument"
| "invalid-state"
| "native";

Defined in: packages/cast/src/errors.ts:12

Why a @afkcodes/timbre-cast call or session failed.

A closed union rather than free-form messages so callers can branch (and so tests assert on the code, not on prose) — CLAUDE.md principle 6. The codes are families: everything receiver-side lands in cast-receiver-fetch because the phone's connectivity is not the receiver's, and conflating the two is the classic cast-app bug this taxonomy exists to prevent.