Errors
Conventional HTTP status codes plus a JSON body. The SDK surfaces these as SolariError with the status preserved on the status field.
Shape
{
"error": "InvalidRequest",
"message": "proxy requires stealth: true"
}Status codes
| Code | Meaning |
|---|---|
| 400 | Validation — body or query is malformed, or a flag combination is rejected (e.g. captcha / proxy without stealth). |
| 401 | Missing, malformed, or revoked bearer token. |
| 402 | Org balance exhausted. Top up in the console. |
| 404 | Resource not found. |
| 413 | storageState over the 1 MB cap. |
| 429 | Rate limited. Back off and retry. |
| 5xx | Transient server-side failure. The SDK retries automatically with backoff. |
SDK error type
import { SolariError } from "@solaribrowser/sdk"
try {
const session = await client.sessions.create({ stealth: true, captcha: true })
} catch (e) {
if (e instanceof SolariError) {
console.error(e.status, e.message)
} else {
throw e
}
}Tuning retries
new Solari({
apiKey,
maxAttempts: 3,
backoffMs: 1000,
timeoutMs: 120_000,
})