Installation
Prerequisites
- API key — sign in to console.topk.io and generate an API key.
- Region — available regions are listed at docs.topk.io/regions.
Usage
Handling errors
The SDK throws plainError objects. Check err.message to identify the error:
err.message | Description |
|---|---|
"collection not found" | Collection does not exist |
"collection already exists" | Collection with this name already exists |
"dataset not found" | Dataset does not exist |
"dataset already exists" | Dataset with this name already exists |
"permission denied" | Invalid or missing API key |
starts with "request too large:" | Request payload too large |
Retries
The client automatically retries on slow-down and LSN consistency timeouts. Retry behaviour can be configured viaretryConfig: