diff --git a/internal/subsonic/errors.go b/internal/subsonic/errors.go new file mode 100644 index 00000000..a7028510 --- /dev/null +++ b/internal/subsonic/errors.go @@ -0,0 +1,17 @@ +package subsonic + +// Subsonic REST error codes per http://www.subsonic.org/pages/api.jsp §3. +// ErrTokenNotSupported (41) is reused for "this user has not enabled the +// requested auth mode" — the historical meaning ("LDAP users can't use +// token auth") is the closest analogue. +const ( + ErrGeneric = 0 + ErrMissingParameter = 10 + ErrClientTooOld = 20 + ErrServerTooOld = 30 + ErrWrongCredentials = 40 + ErrTokenNotSupported = 41 + ErrNotAuthorized = 50 + ErrTrialExpired = 60 + ErrDataNotFound = 70 +)