xtekky/gpt4free · error · ProviderException
Yupp request failed: {str(e)}
Error message
Yupp request failed: {str(e)} What it means
Raised as ProviderException (wrapping the original exception) in Yupp's exception handler after a request attempt fails with an error that is neither a detected token failure nor a 500/internal-server-error (those cases rotate accounts and continue). It signals a request-level failure — network error, unexpected status, or response parsing problem — attributed to the current account.
Source
Thrown at g4f/Provider/Yupp.py:791
# Check for token-related errors in generic exceptions too
if any(x in error_str for x in ["404", "401", "403", "invalid action"]):
token_type = (
"new_conversation"
if is_new_conversation
else "existing_conversation"
)
await token_extractor.mark_token_failed(token_type, next_action)
log_debug(
f"Token failure detected in exception handler: {token_type}"
)
if "500" in error_str or "internal server error" in error_str:
async with account_rotation_lock:
account["error_count"] += 1
continue
async with account_rotation_lock:
account["error_count"] += 1
raise ProviderException(f"Yupp request failed: {str(e)}") from e
raise ProviderException("All Yupp accounts failed after rotation attempts")
@classmethod
async def _process_stream_response(
cls,
response,
account: Dict[str, Any],
scraper: CloudScraper,
prompt: str,
model_id: str,
) -> AsyncResult:
line_pattern = re.compile(b"^([0-9a-fA-F]+):(.*)")
target_stream_id = None
reward_info = None
is_thinking = False
thinking_content = ""
normal_content = ""View on GitHub (pinned to 973504e177)
Solutions
- Inspect the wrapped original exception via the __cause__ chain to identify the real failure
- Update cloudscraper to the latest version (Cloudflare bypass rules go stale)
- Retry with backoff for transient network errors
- Rotate to fresh Yupp tokens or another provider if the error persists
Example fix
try:
resp = await client.chat.completions.create(model='gpt-4o', provider='Yupp', messages=msgs)
except ProviderException as e:
log.error('Yupp failed: %s (cause: %r)', e, e.__cause__) Defensive patterns
Strategy: retry
Try / catch
try:
resp = await create(..., provider='Yupp')
except ProviderException as e:
cause = e.__cause__
if isinstance(cause, (aiohttp.ClientConnectorError, TimeoutError)):
await asyncio.sleep(backoff); retry() # transient
else:
raise # inspect cause before deciding Prevention
- Always inspect __cause__ to distinguish network vs parsing failures
- Keep cloudscraper updated for current Cloudflare bypass rules
- Wrap Yupp calls in bounded retry with exponential backoff
When it happens
Trigger: Any exception escaping the try block around scraper request/response processing that doesn't match the retryable patterns: e.g. aiohttp connection reset, Cloudflare block page parsed unexpectedly, malformed SSE payload in _process_stream_response, or a 4xx status.
Common situations: Transient network drops, Cloudflare challenge changes that cloudscraper can't solve, or upstream Yupp API contract changes breaking response parsing.
Related errors
- CDP module is required for Cloudflare provider. Please ensur
- WebSocket Error: {ws.exception()}
- Failed to obtain Turnstile token for DeepInfra request.
- {message or html}
- No Yupp accounts configured. Set YUPP_API_KEY environment va
AI-assisted analysis of xtekky/gpt4free@973504e177 (2026-08-14).
Data as JSON: /api/errors/914bcd854201005c.
Report an issue: GitHub.