CyborgDBError. The subclass is chosen from the HTTP status code, so callers can catch one class per failure mode.
Error classes
All seven classes extend
CyborgDBError, which extends Error, so existing catch blocks that handle Error still catch them. Each sets name to its class name.
Properties
Retries
The SDK does not retry requests or set a request timeout.retryable marks the errors that are safe to retry; the retry loop is up to the caller:
Errors thrown before a request is sent
Argument checks that run in the SDK, before anything is sent to the service, throwCyborgDBValidationError with statusCode null. This covers:
- an
indexKeythat isn’t 32 bytes, or neitherindexKeynorkmsNamepassed tocreateIndex() query()with neitherqueryVectorsnorqueryContents, or aFloat32Arraywithoutdimension- malformed
upsert()input, such as mismatched array lengths - a
queryMetadata()orderByobject with more than one key
Other statuses
HTTP statuses outside the mapping above (for example405 or 413) throw the base CyborgDBError, with statusCode set.
Set the environment variable CYBORGDB_DEBUG=1 (or true) to print the full error details to stderr.