The result union
No SDK method throws for API or network errors. Every scraping method returns anApiResult, a discriminated union you narrow on the type field:
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
Thestatus field carries the HTTP status code. Branch on it rather than
parsing the message string.