throwError()
Terminate with ERROR on activation.
Import
Section titled “Import”import { throwError } from "@graphrefly/ts/sources";Signature
Section titled “Signature”function throwError(err: unknown): Operator<never, never>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
err | unknown | Host-language error payload to normalize into a protocol ERROR payload. |
Returns
Section titled “Returns”A source operator that emits ERROR.
Example
Section titled “Example”import { graph } from "@graphrefly/ts/graph";import { throwError } from "@graphrefly/ts/sources";
const failed = graph().initNode(throwError(new Error("boom")), []);Source
Section titled “Source”packages/ts/src/graph/sources.ts