Error handling for the Key-Value 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
KEY_TOO_SHORTThe provided key needs to be more than one character.
KEY_TOO_LONGThe provided key has exceeded the maximum 500 characters.
INVALID_KEYThe provided key does not match the regex: /^(?!\s+$)[a-zA-Z0-9:._\s-#]+$/
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
INVALID_FILTER_CONDITIONThe specified condition is not supported for filters.
INVALID_FILTER_VALUESThe specified number of values are not supported by the given condition.
LIST_QUERY_LIMIT_EXCEEDEDLimit for list query should be below 100.
QUERY_WHERE_INVALIDKVS queries should contain only a single "where" clause.
QUERY_WHERE_FIELD_INVALIDThe specified field is not supported for filters.

Rate this page: