Something went wrong. Try again.
Original-language reader for Kant, Aristotle & more: select any passage to gloss, translate, or hear it read aloud, with exact citations.
Something went wrong. Try again.
123456789101112131415161718import { ConvexError } from "convex/values"
/** * True when a gated Convex action rejected the request because the server saw no * valid identity (see `convex/authGuard.ts`). The browser trusts a token only by * its `exp` claim — it never verifies the signature — so a stale-but-unexpired * token reads as "signed in" locally while Convex rejects it. Callers use this to * clear the dead session and re-prompt login instead of surfacing a raw error. */export function isUnauthenticatedError(e: unknown): boolean { return ( e instanceof ConvexError && typeof e.data === "object" && e.data !== null && (e.data as { kind?: unknown }).kind === "unauthenticated" )}