QueryError (Insight Engine)
QueryError (Insight Engine)
|
|
Note
This component was introduced in version |
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:
() => voidA 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 | nullThe current error for the last executed query, or
nullif none is present. -
hasError:
booleantrueif there is an error for the last executed query andfalseotherwise.
Initialize
buildQueryError
Creates an insight QueryError controller instance.
Parameters
-
engine:
InsightEngineThe headless engine.
Returns QueryError
Related types
Unsubscribe
Call signatures
-
(): void;