Batch Query Handler Missing Error
Trace Query.batch without the function that resolves collected inputs.What this error means and what can trigger it
BatchQueryHandlerMissingError means Query.batch received no truthy batch handler. A batch declaration always needs a handler: it receives the collected, validated inputs and returns an effect-like value containing the resolver used for each original caller.
If TypeScript is bypassed, an omitted handler, undefined, null, false, 0, or an empty string reaches the runtime guard. A truthy non-function gets past this particular presence check, albeit only to fail elsewhere. Unlike an ordinary Query, the batch helper has no inputless one-argument handler overload.
Exactly where it triggers
if (!maybe_handler) {
throw new BatchQueryHandlerMissingError();
}This check happens before SER calls the native SvelteKit batch helper. The enclosing factory normalizes and rethrows the existing error unchanged, making it a synchronous declaration-time exception.
For reference, the class is declared at modules/svelte-effect-runtime/src/errors.ts L401 @ C14.
Why this is the case
The schema or "unchecked" sentinel describes how individual inputs enter the batch. It cannot define the data source, batching operation, or the mapping from each input and index to its result.
Without this guard, a handlerless batch would create a remote export that can collect calls but has no rule for completing any of them. The early guard prevents that invalid export from reaching SvelteKit's batching machinery.