Skip to main content

The result union

No SDK method throws for API or network errors. Every scraping method returns an ApiResult, a discriminated union you narrow on the type field:
Checking type narrows the rest of the object — in the success branch data, timeMs, and creditsCost are all available and typed; in the error branch you get status and message.

Error status codes

The status field carries the HTTP status code. Branch on it rather than parsing the message string.