Skip to content

fix(transport): Handle ureq HTTP error statuses - #1177

Merged
szokeasaurusrex merged 1 commit into
masterfrom
szokeasaurusrex/ureq-status-error-bugfix
Jun 18, 2026
Merged

szokeasaurusrex merged 1 commit into
masterfrom
szokeasaurusrex/ureq-status-error-bugfix

Conversation

@szokeasaurusrex

Copy link
Copy Markdown
Member

Previously, ureq returned HTTP 4xx and 5xx responses as send errors, so the transport skipped the response-handling logic for those statuses. As a result, fallback 429 rate-limit handling and 413 payload-too-large logging were not reached.

Set http_status_as_error(false) on ureq envelope requests so HTTP error statuses return as responses and flow through the existing response handling.

Fixes #1176
Fixes RUST-243

@linear-code

linear-code Bot commented Jun 18, 2026

Copy link
Copy Markdown

RUST-243

@szokeasaurusrex
szokeasaurusrex marked this pull request as ready for review June 18, 2026 12:43
@szokeasaurusrex
szokeasaurusrex requested a review from lcian as a code owner June 18, 2026 12:43
Previously, ureq returned HTTP 4xx and 5xx responses as send errors, so the transport skipped the response-handling logic for those statuses. As a result, fallback `429` rate-limit handling and `413` payload-too-large logging were not reached.

Set `http_status_as_error(false)` on ureq envelope requests so HTTP error statuses return as responses and flow through the existing response handling.

Fixes [#1176](#1176)
Fixes [RUST-243](https://linear.app/getsentry/issue/RUST-243)
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/ureq-status-error-bugfix branch from 3d9df5f to 0ee8488 Compare June 18, 2026 12:53

@lcian lcian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, this might've been missed when we bumped ureq to the new major.

@szokeasaurusrex
szokeasaurusrex merged commit 868da31 into master Jun 18, 2026
26 checks passed
@szokeasaurusrex
szokeasaurusrex deleted the szokeasaurusrex/ureq-status-error-bugfix branch June 18, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ureq transport likely does not handle HTTP 429 and 413 responses

2 participants