From 4a447e081dbf63e9167f1277bfc7bd913051a8a3 Mon Sep 17 00:00:00 2001 From: bvandeusen Date: Sun, 19 Apr 2026 17:37:49 +0000 Subject: [PATCH] feat(subsonic): error code constants --- internal/subsonic/errors.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 internal/subsonic/errors.go 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 +)