-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened
SmapiClient does not refresh token
What did you expect to happen
SmapiClient should take the new token when faultstring is tokenRefreshRequired
How to reproduce it (minimal and precise)
Use Spotify service, wait for some time to call again some getMetada
Debug logging
See faultCode is not a string but an object, what the class is looking for is into #text
sonos:smapi:Spotify Soap error getMetadata { faultcode: { '#text': 'ns0:Client.TokenRefreshRequired' }, faultstring: { lang: 'en', '#text': 'tokenRefreshRequired' }, ...
changing all conditions to err.Fault.faultstring['#text'] === SmapiClientErrors.TokenRefreshRequiredError seems to fix the issue on my side, but is it specific to Spotify ? or my env ?
Environment
- sonos-ts version: 2.6.0-beta.11
- OS: Ubuntu 22
- node version (
node -v): v20.17.0
Checklist
Please confirm the following before creating the issue.
- Environment specified
- Checked issues for duplicates
- Debug log added
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working