Fix Spotify API error formatting

This commit is contained in:
Rahul Ahuja 2019-09-06 12:41:24 -07:00
parent 0d6df42d5f
commit 12a8e0a792

View file

@ -152,7 +152,9 @@ class SpotifyPlugin(APIAutotaggerPlugin, BeetsPlugin):
return self._handle_response(request_type, url, params=params)
else:
raise ui.UserError(
u'{} API error:\n{}', self.data_source, response.text
u'{} API error:\n{}\nURL:\n{}\nparams:\n{}'.format(
self.data_source, response.text, url, params
)
)
return response.json()