Skip to content

fix(artwork): say why an artwork search failed - #278

Merged
papi-ux merged 1 commit into
masterfrom
fix/artwork-search-error-codes
Sep 5, 2026
Merged

fix(artwork): say why an artwork search failed#278
papi-ux merged 1 commit into
masterfrom
fix/artwork-search-error-codes

Conversation

@papi-ux

@papi-ux papi-ux commented Sep 5, 2026

Copy link
Copy Markdown
Owner

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.searchArtworkCandidates raises a typed PolarisArtworkSearchUnavailableException(code, httpStatus) on a non-2xx answer, reading only the code field of the host's JSON body; nothing from the provider is retained.
  • NovaArtworkSearchFailure maps steamgriddb_key_missing, steamgriddb_unauthorized, and steamgriddb_rate_limited to 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.artworkProviderFailuresAreNotReportedAsNoMatches is 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).
  • CHANGELOG Unreleased entry.

Exact candidate

Commit: 252f243e1c1204fc84e7f8cd555a47ad30f38442
Tree: 9170e36a13e17532e8cca117247dd2f1b23b4d3b
Parent: bdee2642bf27d8d9a9a90043d695409cb29ae1cf
Base: bdee2642bf27d8d9a9a90043d695409cb29ae1cf

Verification

  • NovaArtworkSearchFailureTest 3/3, NovaArtworkStudioSourceGuardTest 13/13, NovaComposeSourceGuardTest 82/82, PolarisApiClientParsingTest 79/79 (JUnit reports on disk)
  • bash scripts/check-public-docs.sh, bash scripts/check-public-surface.sh, git diff --check: clean

Not covered: a device run against a host with a rejected key; the full JVM suite and lint run in CI.

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.
@papi-ux
papi-ux merged commit 8f0cac5 into master Sep 5, 2026
6 checks passed
@papi-ux
papi-ux deleted the fix/artwork-search-error-codes branch September 5, 2026 04:06
@papi-ux papi-ux mentioned this pull request Sep 5, 2026
4 tasks
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