Automattic / Automattic/wordpress-rs
The offline, cancelled, and generic-fallback branches hardcode `redirects: nil`
- Dominant language
- Rust
- Stars
- 36
- Forks
- 5
- Avg merge
- 17h 30m
- Merged PRs (30d)
- 43
Description
> Split out from Automattic/wordpress-rs#1497 — *Swift executor URLSession error audit*. Section E — Cancellation gaps.
>
> File references are to `native/swift/Sources/wordpress-api/SafeRequestExecutor.swift` unless noted; `:NNN` line numbers were verified against `fix/converge-executor-error-classification`.
**Severity: low.** `handleHttpsError` and `handleNonExistentSiteError` attach `executorDelegate.redirects(for:)`; the other three failure branches don't, losing the redirect trail for a request that redirected and then died mid-transfer, was cancelled, or failed unclassified. `redirects(for:)` returns `nil` when no redirects occurred, so attaching it everywhere is behavior-neutral in the common case. Overlaps the payload half of Automattic/wordpress-rs#1503; looks like an oversight rather than a decision.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in native/swift/Sources/wordpress-api/SafeRequestExecutor.swift, reading handleHttpsError and handleNonExistentSiteError before locating the three failure branches in handleHttpsError that hardcode redirects: nil. Done means each failure path preserves executorDelegate.redirects(for:) while requests with no redirects remain unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100