Skip to content
API/MissingRouterAdapterError

MissingRouterAdapterError

error
src/errors/missing-router-adapter.error.ts

Thrown by useQubeeList when it has no router adapter: none was passed as its second argument, and no adapter provider is above the calling component.

It extends Error rather than core’s QubeeError, whose code is a closed union owned by @qubeejs/core. Object.setPrototypeOf keeps instanceof working when a consumer’s toolchain downlevels classes below ES2015.

Extends Error.

import { MissingRouterAdapterError } from '@qubeejs/react';
new MissingRouterAdapterError()
if (error instanceof MissingRouterAdapterError) {
// the adapter provider is missing from this tree
}