AlistGo/alist · warning · errNotImplemented

not implemented

Error message

not implemented

What it means

Sentinel error errNotImplemented in the aria2 RPC client, reserved for operations the client does not support (as opposed to the daemon). It signals an interface capability gap: the method exists on the Client interface shape but this client build returns the sentinel instead of performing a call.

Source

Thrown at pkg/aria2/rpc/client.go:28

)

// Option is a container for specifying Call parameters and returning results
type Option map[string]interface{}

type Client interface {
	Protocol
	Close() error
}

type client struct {
	caller
	url   *url.URL
	token string
}

var (
	errInvalidParameter = errors.New("invalid parameter")
	errNotImplemented   = errors.New("not implemented")
	errConnTimeout      = errors.New("connect to aria2 daemon timeout")
)

// New returns an instance of Client
func New(ctx context.Context, uri string, token string, timeout time.Duration, notifier Notifier) (Client, error) {
	u, err := url.Parse(uri)
	if err != nil {
		return nil, err
	}
	var caller caller
	switch u.Scheme {
	case "http", "https":
		caller = newHTTPCaller(ctx, u, timeout, notifier)
	case "ws", "wss":
		caller, err = newWebsocketCaller(ctx, u.String(), timeout, notifier)
		if err != nil {
			return nil, err
		}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Check the vendored rpc package for which methods return errNotImplemented and avoid them
  2. Upgrade or align the vendored aria2 rpc package with the API version your code targets
  3. Use ListMethods on the daemon to confirm the operation is supported server-side, then call it via generic Call
Defensive patterns

Strategy: type-guard

Type guard

func supportsCall(c rpc.Client, probe string) bool {
    // consult the vendored package docs/source for stubbed methods
    switch probe {
    case "ChangeGlobalOption", "GetFiles":
        return true
    }
    return false
}

Try / catch

err := c.SomeMethod()
if err != nil && strings.Contains(err.Error(), "not implemented") {
    // fall back to a generic Call with the method name
    err = c.Call("aria2.someMethod", params, &reply)
}

Prevention

When it happens

Trigger: Invoking a client method whose concrete implementation is intentionally unimplemented in this build — e.g. changeGlobalOption/download-only helpers depending on fork version. Because the sentinel is defined at client.go:28 and referenced only there, some builds return it for unsupported URI schemes or notification paths.

Common situations: Code written against a newer/older rpc.Client API than the vendored version; feature-gated builds where BitTorrent or peer-list methods are stubbed out.

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/c2fb5148ac5d6aa8. Report an issue: GitHub.