Readonly
errorLeaf level of the hierarchy of errors.
Informs the exact error that occurred.
Error codes will be unique within the combination of family and scope, at the very least.
Will be something like 'DOCUMENT_ALREADY_EXISTS'
, 'MISSING_PRIMARY_KEY_COLUMNS'
, etc.
Readonly
familyTop level of the hierarchy of errors.
Informs if the error was due to their request or server side processing.
Expected to only ever be 'REQUEST' | 'SERVER'
, but left open for unlikely future expansion.
Readonly
idA unique UUID V4 identifier for this instance of the error.
Readonly
messageA longer human-readable description of the error that contains information specific to the error.
This may contain newlines and other formatting characters.
Optional
Readonly
scopeOptional, second level of the hierarchy of errors.
Informs what area of the request failed.
Will be something like 'DATABASE'
, 'EMBEDDING'
, 'FILTER'
, 'DOCUMENT'
, 'AUTHORIZATION'
, etc.
Readonly
titleA short, human-readable summary of the error.
The title will NOT change for between instances of the same error code.
(that is, every instance of the MULTIPLE_ID_FILTER error returned by the API will have the same title).
Will be something like
'Primary key columns missing'
'Document already exists with the given _id'
Overview
An object representing a single "soft" (2XX) error returned from the Data API, typically with an error code and a human-readable message. An API request may return with an HTTP 200 success error code, but contain a nonzero amount of these, such as for duplicate inserts, or invalid IDs.
Disclaimer
This is not used for "hard" (4XX, 5XX, timeout) errors, which are rarer and would be thrown directly by the underlying code.
Example
Field
id - A unique identifier for this instance of the error.
Field
family - Informs if the error was due to their request or server side processing.
Field
scope - Informs what area of the request failed.
Field
errorCode - Informs the exact error that occurred.
Field
title - A short, human-readable summary of the error.
Field
message - A longer human-readable description of the error.