Automattic / Automattic/wordpress-rs

`.unsupportedURL` is not grouped with `.badURL`

Open Beginner friendly
#1,506 0 comments 0 reactions 0 assignees View on GitHub
Bug Error Handling Swift
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 B — Unchecked URLError codes we could classify better.
>
> 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.** `errorIsNonExistentSiteError` includes `.badURL` ("kept for completeness" per its own comment, `:248-265`) but omits its sibling `.unsupportedURL` (-1002), which therefore falls to `GenericError`. The two codes represent the same user situation — the entered site URL cannot be requested — and the branch comment's rationale applies verbatim. The rustdoc note documenting the `badURL` grouping should mention it too.

Contributor guide

No contributing guide indexed for this repository

Research direction

Open native/swift/Sources/wordpress-api/SafeRequestExecutor.swift and inspect errorIsNonExistentSiteError around lines 248-265, including its branch comment and rustdoc note. Done means .unsupportedURL is grouped with .badURL and the documentation explicitly mentions both codes.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.