Error handling for the Custom Entity Store

In conjunction with proper HTTP status codes, non-2xx responses will have the following schema:

1 2 3 4 { code: string; // "INVALID_KEY_FORMAT" message: string; // "Invalid key format" }

Each 400 Bad Request response will be accompanied by an error code containing more information. The following tables lists all possible error codes, what they mean, and what you can do to address each one:

Error codeDescription
EMPTY_KEYKey cannot be empty.
INVALID_KEYThe provided key does not match the regex: /^(?!\s+$)[a-zA-Z0-9:._\s-#]+$/
KEY_TOO_LONGThe provided key has exceeded the maximum 500 characters.
NOT_FOUNDThe specified key does not exist.
Error codeDescription
MAX_SIZEThe provided value has exceeded the maximum size limit.
MAX_DEPTHThe provided value has exceeded the maximum object depth (32) limit.
Error codeDescription
ENTITY_TYPE_TOO_SHORTThe provided key needs to be more than 3 characters.
ENTITY_TYPE_TOO_LARGEThe provided key has exceeded the maximum 60 characters.
INVALID_ENTITY_TYPEThe provided key does not match the regex: /^(?![\.\-])(?!.*\.{2})[a-z0-9:\-.]*(?<![.])$/.
INVALID_ENTITY_VALUEEntity values must match one of the types defined in Custom Entities.
INVALID_ENTITY_ATTRIBUTEThe specified attribute name is a reserved value and cannot be utilized.
INVALID_ENTITY_INDEXThe custom entity index provided is invalid. The index name is a reserved value and cannot be utilized.
Error codeDescription
COMPLEX_QUERY_PAGE_LIMIT_NOT_IN_RANGEThe page limit must be set between 1 and 100.
EMPTY_FILTER_OPERATORFilter operators "and" and "or" cannot be empty.
INVALID_FILTER_OPERATORS_COMBINATIONFilter operators "and" and "or" cannot be present at the same level.
INSUFFICIENT_FILTER_VALUESThe specified condition needs at least two values.

Rate this page: