Errors

UnbrowseError
├─ UnbrowseAPIError
│  ├─ UnbrowseAuthenticationError       // 401
│  ├─ UnbrowseInsufficientCreditsError  // 402
│  ├─ UnbrowsePermissionError           // 403
│  ├─ UnbrowseNotFoundError             // 404
│  ├─ UnbrowseRateLimitError            // 429
│  └─ UnbrowseServerError               // 5xx
└─ UnbrowseConnectionError
   └─ UnbrowseTimeoutError
try {
  await unbrowse.execute({ endpoint_id });
} catch (error) {
  if (error instanceof UnbrowseInsufficientCreditsError) {
    console.error("Add account credits before retrying");
  }
  throw error;
}