AlistGo/alist · warning · NotImplement
not implement
Error message
not implement
What it means
errs.NotImplement marks a driver method that the storage backend deliberately does not provide (as opposed to not-yet-written). When a caller invokes such a method on the driver, this sentinel is returned so upper layers can surface 'this operation is not available' rather than panic or silently no-op.
Source
Thrown at internal/errs/errors.go:11
package errs
import (
"errors"
"fmt"
pkgerr "github.com/pkg/errors"
)
var (
NotImplement = errors.New("not implement")
NotSupport = errors.New("not support")
RelativePath = errors.New("access using relative path is not allowed")
MoveBetweenTwoStorages = errors.New("can't move files between two storages, try to copy")
UploadNotSupported = errors.New("upload not supported")
MetaNotFound = errors.New("meta not found")
StorageNotFound = errors.New("storage not found")
StreamIncomplete = errors.New("upload/download stream incomplete, possible network issue")
StreamPeekFail = errors.New("StreamPeekFail")
UnknownArchiveFormat = errors.New("unknown archive format")
WrongArchivePassword = errors.New("wrong archive password")
DriverExtractNotSupported = errors.New("driver extraction not supported")
)
// NewErr wrap constant error with an extra message
// use errors.Is(err1, StorageNotFound) to check if err belongs to any internal errorView on GitHub (pinned to 843d9dc814)
Solutions
- Check the driver's documented capability set before invoking optional operations
- Guard the call: treat NotImplement as 'feature absent' and hide/disable the corresponding UI action
- Switch to a driver that supports the operation, or perform the operation out-of-band
- For driver authors: implement the method or keep returning the sentinel so callers can detect it
Example fix
// before
err := fsRename(ctx, storage, obj, "new.txt")
// after
err := fsRename(ctx, storage, obj, "new.txt")
if errors.Is(err, errs.NotImplement) {
// hide/disable rename in UI for this storage
} Defensive patterns
Strategy: type-guard
Validate before calling
// consult driver capabilities before calling
if !driverSupports(storage.Driver, "Rename") { return errs.NotImplement } Type guard
func isNotImplement(err error) bool { return errors.Is(err, errs.NotImplement) } Try / catch
err := fs.Rename(ctx, storage, obj, newName)
if errors.Is(err, errs.NotImplement) {
hideActionInUI("rename", storage) // degrade gracefully
} else if err != nil { return err } Prevention
- Model per-driver capabilities and filter UI actions by them
- Check for the sentinel with errors.Is, not string matching
- Treat NotImplement as absent feature — don't retry
When it happens
Trigger: Calling an optional driver operation that the specific driver never implemented — e.g. Rename, Move, Copy, Put, or driver-side archive extraction on a read-only or minimal driver whose method body is 'return errs.NotImplement'.
Common situations: UI showing actions (rename/move/upload) for a storage whose driver doesn't support them; automation assuming a uniform driver interface hits a minimal driver; new drivers where only List/Link exist; feature-gating code checking driver capabilities by error type.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/e1c964007e5762a5.
Report an issue: GitHub.