tonhowtf/omniget · error
{}
Error message
{} What it means
After POSTing the payload to the SponsorBlock /api/skipSegments endpoint, submit checks the HTTP status; any response outside 200..300 is converted into an anyhow error whose message comes from submit_error(status, &text) — a mapped, human-readable description of the API error (or a generic 'SponsorBlock: HTTP <status>' fallback). This is the propagation point for all server-side rejections.
Solutions
- Read the error message: it contains submit_error's mapping of the status and the first part of the response body — fix the indicated cause.
- For 409, the segment already exists — no resubmission needed.
- For 429, wait and retry with backoff; reduce submission frequency.
- For 403, the local user ID is banned — regenerate the key or appeal via SponsorBlock.
- For 5xx or network errors, retry later; check the SponsorBlock service status.
Example fix
// before
let resp = client.post(url).json(&body).send().await?; // 429 ignored until here
// after
if status == 429 {
tokio::time::sleep(Duration::from_secs(30)).await;
return submit(opts).await; // retry with backoff
} Defensive patterns
Strategy: retry
Validate before calling
// pre-flight: check connectivity
let resp = client.get(format!("{SERVER}/api/status")).send().await?; Try / catch
match submit(opts.clone()).await {
Err(e) if e.to_string().contains("HTTP 429") => { sleep(BACKOFF).await; submit(opts).await }
Err(e) if e.to_string().contains("HTTP 409") => Ok(SubmitResult::duplicate()), // already exists
other => other,
} Prevention
- Match on the status embedded in the error message to handle 409 (duplicate) and 429 (rate limit) distinctly.
- Add exponential backoff for 5xx and 429 responses.
- Avoid duplicate submissions by tracking already-submitted segments locally.
- Check SponsorBlock service status before bulk submissions.
When it happens
Trigger: The SponsorBlock server returns 400 (invalid payload), 403 (banned user), 409/429 (duplicate segment / rate limit), 5xx (server trouble), or any other non-2xx status on submit.
Common situations: Submitting a segment that already exists (duplicate); the user's private ID being banned/downvoted; SponsorBlock rate limiting rapid submissions; network proxies or captive portals returning HTML error pages; SponsorBlock API outages.
Related errors
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/c456b9c0167a221b.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/sponsorblock.rs:358
return Err(anyhow!(
"o envio é público e vale para todo mundo: confirme antes"
));
}
let id = video_id(&opts.url)
.ok_or_else(|| anyhow!("nao reconheci um video do YouTube em: {}", opts.url))?;
let user = local_user_id()?;
let body = build_payload(&id, &user, opts.video_duration, &opts.segments)?;
let client = super::client()?;
let resp = client
.post(format!("{}/api/skipSegments", SERVER))
.json(&body)
.send()
.await?;
let status = resp.status().as_u16();
let text = resp.text().await.unwrap_or_default();
if !(200..300).contains(&status) {
return Err(anyhow!("{}", submit_error(status, &text)));
}
let uuids: Vec<String> = serde_json::from_str::<Vec<serde_json::Value>>(&text)
.map(|arr| {
arr.iter()
.filter_map(|v| v["UUID"].as_str().map(|s| s.to_string()))
.collect()
})
.unwrap_or_default();
Ok(SubmitResult {
accepted: if uuids.is_empty() {
opts.segments.len()
} else {
uuids.len()
},
video_id: id,
uuids,
fingerprint: public_fingerprint(&user),
message: text.trim().chars().take(200).collect(),View on GitHub (pinned to 8600b91f42)