QueryError (Insight Engine)

This is for:

Developer

The QueryError controller allows to retrieve information about the current error returned by the search API, if any.

Methods

subscribe

Adds a callback that’s invoked on state change.

Parameters

  • listener: () => void

    A callback that’s invoked on state change.

Returns Unsubscribe: A function to remove the listener.

Attributes

state

The state of the QueryError controller.

Properties

  • error: ErrorPayload | null

    The current error for the last executed query, or null if none is present.

  • hasError: boolean

    true if there is an error for the last executed query and false otherwise.

Initialize

buildQueryError

Creates an insight QueryError controller instance.

Parameters

  • engine: InsightEngine

    The headless engine.

Returns QueryError

Unsubscribe

Call signatures

  • (): void