Skip to content
PACKAGES

throwError()

Terminate with ERROR on activation.

import { throwError } from "@graphrefly/ts/sources";
function throwError(err: unknown): Operator<never, never>
ParameterTypeDescription
errunknownHost-language error payload to normalize into a protocol ERROR payload.

A source operator that emits ERROR.

import { graph } from "@graphrefly/ts/graph";
import { throwError } from "@graphrefly/ts/sources";
const failed = graph().initNode(throwError(new Error("boom")), []);

packages/ts/src/graph/sources.ts