fix(api): Retry API requests on DNS resolution failure#3085
fix(api): Retry API requests on DNS resolution failure#3085szokeasaurusrex merged 5 commits intomasterfrom
Conversation
e5f8b7e to
e6938fe
Compare
4ea812a to
63df8e7
Compare
571dd03 to
99c690c
Compare
When DNS resolution fails (CURLE_COULDNT_RESOLVE_HOST), the CLI now retries the request using the existing exponential backoff retry mechanism. This addresses intermittent DNS failures that were causing ~5-10% of builds to fail. Fixes #2763 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
99c690c to
7b3a600
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| } | ||
| current = error.source(); | ||
| } | ||
| false |
There was a problem hiding this comment.
is_dns_error never finds curl::Error through anyhow wrapper
High Severity
is_dns_error can never return true because the curl::Error is wrapped inside an anyhow::Error, and dyn Error::downcast_ref::<curl::Error>() on an &anyhow::Error trait object checks the TypeId of anyhow::Error (not the inner type). The From<curl::Error> for ApiError impl stores the curl error via set_source, which wraps it in anyhow::Error. When err.source() returns &anyhow::Error as &dyn Error, downcast_ref::<curl::Error>() always returns None, and anyhow::Error's Error::source() delegates to curl::Error::source() which returns None, ending the loop. The DNS retry feature is completely non-functional.


Description
Sentry CLI now retries requests that fail to resolve
sentry.io, addressing intermittent failures for some users uploading symbol files. Retries are limited tosentry.iohosts to avoid masking configuration issues for other domains.Issues