package subsonic type Error struct { Code int `xml:"code,attr" json:"code"` Message string `xml:"message,attr" json:"message"` } type ErrorResponse struct { Response Error Error `xml:"error" json:"error"` } var ( ErrorGeneric = Error{0, "A generic error."} ErrorRequired = Error{10, "Required parameter is missing."} ErrorIncompatibleClient = Error{20, "Incompatible Subsonic REST protocol version. Client must upgrade."} ErrorIncompatibleServer = Error{30, "Incompatible Subsonic REST protocol version. Server must upgrade."} ErrorWrongAuth = Error{40, "Wrong username or password."} ErrorLDAPTokenAuth = Error{41, "Token authentication not supported for LDAP users."} ErrorUserUnauthorized = Error{50, "User is not authorized for the given operation."} ErrorTrialPeriodEnded = Error{60, "The trial period for the Subsonic server is over. Please upgrade to Subsonic Premium. Visit subsonic.org for details. "} ErrorNotFound = Error{70, "The requested data was not found."} )