Conversation
GrandSlam reports its own errors inside the plist, so the HTTP status only matters when the body is not one. Parse first and, when that fails, throw an ALTAppleAPIError carrying the status, with a specific message for a 429 rate limit. This replaces the separate 5xx checks in the sign-in and 2FA verify handlers, which let a 429 HTML page reach the parser and surface as NSCocoaErrorDomain 3840.
izaankml
force-pushed
the
fix/report-http-status-on-non-plist
branch
from
September 14, 2026 20:45
ee97d65 to
12b361b
Compare
izaankml
added a commit
to izaankml/AltStore
that referenced
this pull request
Sep 14, 2026
Points the submodule at izaankml/AltSign classic-build: upstream notarized plus the Xcode 27 linking fix, the HTTP status reporting from rileytestut/AltSign#56, and the developer-services transport change. Build branch only; never carry this commit into a PR.
izaankml
added a commit
to izaankml/AltStore
that referenced
this pull request
Sep 14, 2026
Points the submodule at izaankml/AltSign classic-build: upstream notarized plus the Xcode 27 linking fix and the HTTP status reporting from rileytestut/AltSign#56. Build branch only; never carry this commit into a PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When Apple rate limits sign-in, GrandSlam answers with an HTTP 429 HTML page. The status is below 500, so it passes the 5xx check and reaches the plist parser, and the user sees "The data couldn't be read because it isn't in the correct format" (NSCocoaErrorDomain 3840, unknown tag html). Any other non-5xx HTML response fails the same way. This is easy to hit with AltStore Classic, which signs in once per app on individual refreshes.
Fix
GrandSlam reports its own errors inside the plist, so the HTTP status only matters when the body is not a plist. Parse first, and when that fails throw an ALTAppleAPIError.unknown carrying the HTTP status and the parse error, with a rate-limit message for 429 and the existing "returned an error (HTTP n)" message for everything else. This replaces the separate 5xx checks in the sign-in and trusted-device 2FA handlers with one helper, so every HTML response is reported the same way.
Testing
An earlier revision of this change was built into AltStore Classic on iOS. After several sign-ins within a minute, GrandSlam returned HTTP 429 and the AltStore error log showed "Apple's servers returned an unexpected response (HTTP 429)" instead of the parse error. Sign-in succeeded on retry after waiting. The final revision builds with the AltSign-Static scheme on macOS.
Related: #48, altstoreio/AltStore#1776