Commit 4bda48cf2c

4bda48cf2c04cfc5c8985b900f852e2101c15d91

parent: 2d5bac75e0

Unsigned

cmc <hello@cleberg.net> · 2026-07-16 00:26 UTC

fix: stop shadowing serviceNotProvisioned classification

"No such repository or user found" matched the broad "no such" test for
.notFound, which ran first and made the .serviceNotProvisioned rule below it
unreachable. Users hitting a service they have not activated were told the
content was no longer available rather than that the account needs to enable
the service.

Order the specific check ahead of the general one.

Layout: unified · split

Hutch/Networking/SRHTError.swift +5 −3
@@ -174,12 +174,14 @@ extension Array where Element == GraphQLError {
174 if containsMessage("unknown revision") || containsMessage("path not in the working tree") { 174 if containsMessage("unknown revision") || containsMessage("path not in the working tree") {
175 return .unknownRevision 175 return .unknownRevision
176 } 176 }
177 if containsMessage("not found") || containsMessage("no such") || containsMessage("missing revision") { 177 // Must precede the broader "no such" check below, which would otherwise
178 return .notFound 178 // shadow this and report a provisioning failure as missing content.
179 }
180 if containsMessage("no such repository or user found") { 179 if containsMessage("no such repository or user found") {
181 return .serviceNotProvisioned 180 return .serviceNotProvisioned
182 } 181 }
182 if containsMessage("not found") || containsMessage("no such") || containsMessage("missing revision") {
183 return .notFound
184 }
183 if let primaryMessage, !primaryMessage.isEmpty { 185 if let primaryMessage, !primaryMessage.isEmpty {
184 return .validation 186 return .validation
185 } 187 }