Remote Helper Error
Trace a non-Error JavaScript value caught at a remote helper boundary.What this error means and what can trigger it
RemoteHelperError normalizes a value caught while SER creates a native remote helper, captures request state, or synchronously invokes a handler when that value is not an Error instance.
Examples include throw "failed", throw 42, throw null, or throw { reason: "failed" }. SER keeps the original value in value and builds the message with String(value) plus the stable REMOTE_HELPER_ERROR prefix. Existing JavaScript errors pass through unchanged, while recognized SvelteKit context failures become RemoteHelperContextError instead.
Exactly where it triggers
if (is_sveltekit_remote_context_error(err)) {
return new RemoteHelperContextError(helper_name);
}
return err instanceof Error ? err : new RemoteHelperError(err);Every normalization call listed for RemoteHelperContextError can reach this branch. Factory catches live in server/factories.ts; wrapper catches live in server/wrappers.ts. For reference, the class itself is declared at modules/svelte-effect-runtime/src/errors.ts L848 @ C14.
This class describes synchronous JavaScript values caught at those boundaries. A typed effect failure produced after handler execution starts is encoded through the remote failure protocol and does not automatically become RemoteHelperError.
Why this is the case
JavaScript permits throwing values that have no stack, name, or message contract. Remote helper boundaries need an actual Error for consistent rethrowing and diagnostics, while replacing the raw value entirely would remove useful evidence.
The conditional preserves well-formed errors, gives request-context failures their specific class, and wraps only the remaining arbitrary values.