MCPcopy Index your code
hub / github.com/anomalyco/opencode / isSessionNotFoundError

Function isSessionNotFoundError

packages/app/src/utils/server-errors.ts:45–50  ·  view source on GitHub ↗
(error: unknown, sessionID: string)

Source from the content-addressed store, hash-verified

43}
44
45export function isSessionNotFoundError(error: unknown, sessionID: string) {
46 const unwrapped = unwrapNamedError(error)
47 if (typeof unwrapped !== "object" || unwrapped === null) return false
48 const value = unwrapped as Record<string, unknown>
49 return value._tag === "SessionNotFoundError" && value.sessionID === sessionID
50}
51
52function isConfigInvalidErrorLike(error: unknown): error is ConfigInvalidError {
53 if (typeof error !== "object" || error === null) return false

Callers 2

Calls 1

unwrapNamedErrorFunction · 0.85

Tested by

no test coverage detected