On this page

UncheckedQueryHandlerMissingError

Trace an unchecked Query declaration whose executable handler is absent.

What this error means and what can trigger it

UncheckedQueryHandlerMissingError means Query("unchecked", handler) reached the server factory without a truthy second argument. The string sentinel disables input-schema validation, but it does not contain the operation that reads the data.

The public TypeScript overload rejects these calls early. In untyped JavaScript or through an unsafe cast, however, an omitted handler, undefined, null, false, 0, or an empty string can still reach the guard. A truthy non-function passes this particular check and may fail later while the wrapper is built or invoked.

Exactly where it triggers

if (is_unchecked(validate_or_handler)) {
	throw new UncheckedQueryHandlerMissingError();
}

From there, the enclosing factory catches the exception, passes it through normalize_remote_helper_error, and rethrows it. Existing Error instances are returned unchanged, so the class, message, and stack survive. This is a synchronous factory exception, not an effect failure from the query handler.

For reference, the class is declared at modules/svelte-effect-runtime/src/errors.ts L381 @ C14.

Why this is the case

The one-argument Query(handler) overload represents an inputless query. The two-argument unchecked overload uses its first argument only to select validation behavior. Without the guard, the factory could mistake the sentinel string for the inputless handler and pass it into the remote wrapper.

As a result, the explicit error keeps overload misuse separate from an eventual "value is not callable" failure and identifies that validation was intentionally disabled while execution logic was accidentally omitted.