Skip to content

Raise rate limit and authentication errors - #869

Merged
joostlek merged 1 commit into
mainfrom
ccr-af58c15a-nqvsya-error-status-codes
Nov 4, 2026
Merged

joostlek merged 1 commit into
mainfrom
ccr-af58c15a-nqvsya-error-status-codes

Conversation

@joostlek

Copy link
Copy Markdown
Owner

Proposed Changes

SpotifyRateLimitError and SpotifyAuthenticationFailedError are exported but never raised, and the rate_limit.json fixture isn't used by any test. A 429 or 401 response was returned as if it were data, then failed in the models with a confusing MissingField error. This is the behaviour #417 reported; the fix from #425 appears to have been lost.

_request now raises:

  • SpotifyAuthenticationFailedError on 401
  • SpotifyRateLimitError on 429
  • SpotifyNotFoundError on a 404 status code, in addition to the existing check for a 404 error body

New tests cover all three; they fail on main and pass with this change.

Related Issues


Generated by Claude Code

@joostlek joostlek added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Oct 30, 2026 — with Claude
@sonarqubecloud

Copy link
Copy Markdown

@joostlek
joostlek merged commit 1fbe6f4 into main Nov 4, 2026
14 checks passed
@joostlek
joostlek deleted the ccr-af58c15a-nqvsya-error-status-codes branch November 4, 2026 11:38
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants