Overview
functionCore Runtime

isThrown

Narrows an error value to `Thrown`.

Signature

tsSignature
export function isThrown(error: unknown): error is Thrown;

Imports

tsImport
import { isThrown } from "@/lib/flow/core/runtime";
import { isThrown } from "@/lib/flow";

Parameters

error
unknown

Error value to inspect.

Returns

`true` when the value is a thrown runtime error.

Return type
error is Thrown
Thrown

Runtime error returned when user code throws.

type

Source

tsflow/core/runtime.ts:247-249
export function isThrown(error: unknown): error is Thrown {
return typeof error === "object" && error !== null && "kind" in error && error.kind === "thrown";
}