Skip to main content
Version: Beta

SearchErrors

description

These error codes are used in the "extensions" field of the Apollo GraphQL Error object. The field "code" would have "BAD_USER_INPUT", the "reason" field - one of the enum items, and the "details" field - an optional explanatory text.

Example: { "errors": [ { < Other GQL error fields > "extensions": { "code": "BAD_USER_INPUT", "reason": "<REASON_CODE>", "details": "Optional explanatory text" } } ] }

enum SearchErrors {
INVALID_INDUSTRY_FILTER_VALUES
INVALID_COMPANY_FILTER_VALUES
INVALID_QUERY_TEXT
INVALID_VALUE
INCOMPATIBLE_FIELDS
NOT_FOUND
}

Values

SearchErrors.INVALID_INDUSTRY_FILTER_VALUES

Thrown when given industry codes are invalid

SearchErrors.INVALID_COMPANY_FILTER_VALUES

Thrown when the system fails to resolve given company IDs

SearchErrors.INVALID_QUERY_TEXT

Thrown when given search query is invalid (e.g. invalid logical expression)

SearchErrors.INVALID_VALUE

Generic input validation error, details to be found in the "details" field

SearchErrors.INCOMPATIBLE_FIELDS

Thrown when mutually excluding input fields are used in the query

SearchErrors.NOT_FOUND

Thrown when a resource is not found!