Skip to content

Conversation

@flimzy
Copy link
Contributor

@flimzy flimzy commented Apr 16, 2025

Today's Spotify outage, and the plethora of random errors it's causing my service to return, inspired me to make errors a bit more parseable.

This PR does two things:

  • It adds a convenience HTTPStatus() int method on the custom spotify.Error type, as an easy way to convient the HTTP status.
  • It ensures that all errors actually include said HTTP status, when it's available.

It also changes the wording of some errors, for consistency, which may break some consumers of this library, if they depend on error string matching, which this PR will help make less necessary.

@strideynet strideynet merged commit 46fd704 into zmb3:master Apr 16, 2025
2 checks passed
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.

2 participants