Without the option a 401 or 403 already fell to the default branch, which
answers ErrTransient without a retry, the same as the option's own branch.
The only difference was "(auth)" in the message. TheAudioDB and both
Last.fm providers set it; none read the message. The reason it gave, that
a bad key retries later instead of settling the row as "none", now sits on
the default branch, and the client's status table checks 401 and 403.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- backup: schema coverage's three tests and the three AWS signing
examples, one table each.
- scrobble: Qualifies' six boundary tests; the ListenBrainz client's
refusal mapping, twelve tests of the same rule across three calls, one
table over call x status; the two similarity lookups' success and URL
tests, one table.
- playevents: the skip rule's three plays share one fixture. Dropped
TestRecordPlayEnded_SubThreshold_NoEnqueue: the writer only calls
scrobble.MaybeEnqueue, whose own test and Qualifies' table hold that
case; the qualifying-play test still proves the writer calls it.
- recsettings: the three tag-scale tests share one database reset.
- apierror: Error() and From, one test each; auth: RequireAdmin's three.
- providers: GetJSON's not-found and transient answers, one table. Its
two 401 tests expected the same answer with and without
TreatAuthAsTransient, which changes only the error's text; the table
says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
coverart/httpclient.go and tags/httpclient.go were the same client:
pacing, exponential backoff with jitter, 401/403-as-transient, body
caps. Tags had added a User-Agent and a shared Pacer, cover art an image
GET. providers.HTTPClient now has all of it, with the tests that were in
coverart. ErrTransient is shared too, so both families' errors.Is still
match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>