Solari Browserdocs

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

CodeMeaning
400Validation — body or query is malformed, or a flag combination is rejected (e.g. captcha / proxy without stealth).
401Missing, malformed, or revoked bearer token.
402Org balance exhausted. Top up in the console.
404Resource not found.
413storageState over the 1 MB cap.
429Rate limited. Back off and retry.
5xxTransient 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,
})