Skip to content

feat: add NetworkError.gone for HTTP 410 - #3

Merged
mchirino89 merged 1 commit into
mainfrom
feat/network-error-gone-410
Jul 27, 2026
Merged

mchirino89 merged 1 commit into
mainfrom
feat/network-error-gone-410

Conversation

@mchirino89

Copy link
Copy Markdown
Contributor

What

Adds case gone = 410 to NetworkError, with a localizedDescription entry.

Why

410 Gone is the semantically correct status for a permanently-expired resource (RFC 9110). Without the case, buildError(from: 410) degraded to .unknown, which erases the signal downstream consumers need — MatchWords' challenge-links backend uses 410 for expired challenges (documentation/CHALLENGE_LINKS.md).

Verification

  • swift test: 24/24 green. The existing NetworkErrorTestCase.testErrorCodeMatching iterates allCases, so the new case is pinned (round-trip + non-empty description) with no new test needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cz7KThgfTBVH8Y3wUju6GX

The resource existed and is permanently gone — distinct from 404, and
exactly what an expired challenge link maps to. Without it
buildError(from: 410) degraded to .unknown.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cz7KThgfTBVH8Y3wUju6GX
@mchirino89
mchirino89 merged commit 9406561 into main Jul 27, 2026
1 check passed
@mchirino89
mchirino89 deleted the feat/network-error-gone-410 branch July 27, 2026 03:37
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.

1 participant