Update error status codes from
@@ -72,13 +72,16 @@ else:
from urllib.parse import quote_plus as url_quote_plus
+# 1 : This error does not exist
STATUS_INVALID_SERVICE = 2
STATUS_INVALID_METHOD = 3
STATUS_AUTH_FAILED = 4
STATUS_INVALID_FORMAT = 5
STATUS_INVALID_PARAMS = 6
STATUS_INVALID_RESOURCE = 7
-STATUS_TOKEN_ERROR = 8
+# DeprecationWarning: STATUS_TOKEN_ERROR is deprecated and will be
+# removed in a future version. Use STATUS_OPERATION_FAILED instead.
+STATUS_OPERATION_FAILED = STATUS_TOKEN_ERROR = 8
STATUS_INVALID_SK = 9
STATUS_INVALID_API_KEY = 10
STATUS_OFFLINE = 11
@@ -86,6 +89,20 @@ STATUS_SUBSCRIBERS_ONLY = 12
STATUS_INVALID_SIGNATURE = 13
STATUS_TOKEN_UNAUTHORIZED = 14
STATUS_TOKEN_EXPIRED = 15
+STATUS_TEMPORARILY_UNAVAILABLE = 16
+STATUS_LOGIN_REQUIRED = 17
+STATUS_TRIAL_EXPIRED = 18
+# 19 : This error does not exist
+STATUS_NOT_ENOUGH_CONTENT = 20
+STATUS_NOT_ENOUGH_MEMBERS = 21
+STATUS_NOT_ENOUGH_FANS = 22
+STATUS_NOT_ENOUGH_NEIGHBOURS = 23
+STATUS_NO_PEAK_RADIO = 24
+STATUS_RADIO_NOT_FOUND = 25
+STATUS_API_KEY_SUSPENDED = 26
+STATUS_DEPRECATED = 27
+# 28 : This error is not documented
+STATUS_RATE_LIMIT_EXCEEDED = 29
PERIOD_OVERALL = "overall"
PERIOD_7DAYS = "7day"
@@ -1414,13 +1431,25 @@ class WSError(Exception):
STATUS_INVALID_FORMAT = 5
STATUS_INVALID_PARAMS = 6
STATUS_INVALID_RESOURCE = 7
- STATUS_TOKEN_ERROR = 8
+ STATUS_OPERATION_FAILED = 8
STATUS_INVALID_SK = 9
STATUS_INVALID_API_KEY = 10
STATUS_OFFLINE = 11
STATUS_SUBSCRIBERS_ONLY = 12
STATUS_TOKEN_UNAUTHORIZED = 14
STATUS_TOKEN_EXPIRED = 15
+ STATUS_TEMPORARILY_UNAVAILABLE = 16
+ STATUS_LOGIN_REQUIRED = 17
+ STATUS_TRIAL_EXPIRED = 18
+ STATUS_NOT_ENOUGH_CONTENT = 20
+ STATUS_NOT_ENOUGH_MEMBERS = 21
+ STATUS_NOT_ENOUGH_FANS = 22
+ STATUS_NOT_ENOUGH_NEIGHBOURS = 23
+ STATUS_NO_PEAK_RADIO = 24
+ STATUS_RADIO_NOT_FOUND = 25
+ STATUS_API_KEY_SUSPENDED = 26
+ STATUS_DEPRECATED = 27
+ STATUS_RATE_LIMIT_EXCEEDED = 29
"""
return self.status
