how to interpret ERROR_UNSUPPORTED_NAMESPACE on getGroups?

72 Views Asked by At

I'm troubleshooting some errors from the Sonos API, where calls to getGroups result in HTTP 404. Here's a sample response:

{
  "errorCode": "ERROR_UNSUPPORTED_NAMESPACE",
  "reason": "Unexpected error"
}

And here's the corresponding request (with token and household_id redacted): curl -H "Authorization: Bearer <token>" "https://api.ws.sonos.com/control/api/v1/households/<household_id>/groups"

This error is happening repeatedly for this particular token, which otherwise appears correct and was used to retrieve the household_id used above.

For most users, the same code path and request yields HTTP 200 and a collection of players and groups.

1

There are 1 best solutions below

0
Paul Boyce On

I'm getting the exact same error for 2 users and I can't replicate it on my end.

The documentation says;

When your app sends a namespace that is not recognized by the player, you’ll receive an ERROR_UNSUPPORTED_NAMESPACE error response. Note that namespaces are case-sensitive. For example, if you misspelled the namespace, the player responds with an ERROR_UNSUPPORTED_NAMESPACE in the global namespace:

{ "errorCode": "ERROR_UNSUPPORTED_NAMESPACE" }

https://developer.sonos.com/reference/types/globalerror/

Like you, I have not spelled anything incorrectly and as its working correctly for the vast majority of users. Again, I can get households for these particular users but not groups.

I am at a complete loss but if I find out the reason I'll follow up.

Thanks, Paul