fix(artwork): say why an artwork search failed - #278
Merged
Conversation
Every failed candidate search showed the same "Artwork search unavailable" line, whether the host had no SteamGridDB key, SteamGridDB rejected the key, or the provider was rate limiting the host. Polaris now answers a failed search with a stable code, so the client raises a typed PolarisArtworkSearchUnavailableException carrying that code and the HTTP status, nothing from the provider body, and the game detail sheet maps steamgriddb_key_missing, steamgriddb_unauthorized, and steamgriddb_rate_limited to messages that name the fix. Unknown codes and older hosts keep the generic message. The source guard that pins this path moves to the new form with the same intent: HTTP, envelope, and malformed-body failures surface without retaining provider content.
4 tasks
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.
Summary
Companion to papi-ux/polaris#607. Every failed artwork search read "Artwork search unavailable. Check SteamGridDB in Polaris and try again", whether the host had no SteamGridDB key, SteamGridDB rejected the key, or the host was rate limited. That is what happened on 2026-09-04 with a key that a pre-1.4.1 settings save had blanked.
PolarisApiClient.searchArtworkCandidatesraises a typedPolarisArtworkSearchUnavailableException(code, httpStatus)on a non-2xx answer, reading only thecodefield of the host's JSON body; nothing from the provider is retained.NovaArtworkSearchFailuremapssteamgriddb_key_missing,steamgriddb_unauthorized, andsteamgriddb_rate_limitedto three new strings that name the fix; unknown codes and older hosts that send no body keep the existing generic message. "No matches" stays reserved for a successful empty search.NovaComposeSourceGuardTest.artworkProviderFailuresAreNotReportedAsNoMatchesis re-pinned to the new form with the same intent (HTTP, envelope, and malformed-body failures surface without retaining provider content; the sheet maps the typed failure separately from the generic catch).Exact candidate
Commit:252f243e1c1204fc84e7f8cd555a47ad30f38442Tree:9170e36a13e17532e8cca117247dd2f1b23b4d3bParent:bdee2642bf27d8d9a9a90043d695409cb29ae1cfBase:bdee2642bf27d8d9a9a90043d695409cb29ae1cfVerification
NovaArtworkSearchFailureTest3/3,NovaArtworkStudioSourceGuardTest13/13,NovaComposeSourceGuardTest82/82,PolarisApiClientParsingTest79/79 (JUnit reports on disk)bash scripts/check-public-docs.sh,bash scripts/check-public-surface.sh,git diff --check: cleanNot covered: a device run against a host with a rejected key; the full JVM suite and lint run in CI.