AlistGo/alist · warning · NotSupport
not support
Error message
not support
What it means
errs.NotSupport is distinct from NotImplement: it marks operations the backend fundamentally does not support (the provider API offers no equivalent), not merely unimplemented code. It lets upper layers differentiate 'will never work' from 'not built yet'.
Source
Thrown at internal/errs/errors.go:12
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 error
func NewErr(err error, format string, a ...any) error {View on GitHub (pinned to 843d9dc814)
Solutions
- Verify the operation is possible on the provider at all (check its API docs) before wiring UI/automation
- Handle NotSupport explicitly and hide or disable the action for that storage type
- Use copy+delete as a substitute for unsupported move where the driver supports both
- Pick a different storage backend if the operation is a hard requirement
Example fix
// before
err := d.Move(ctx, src, dst)
if err != nil { return err }
// after
err := d.Move(ctx, src, dst)
if errors.Is(err, errs.NotSupport) {
err = copyThenDelete(ctx, src, dst) // fallback strategy
} Defensive patterns
Strategy: fallback
Validate before calling
if !driverSupports(storage.Driver, "Move") { return errs.NotSupport } Type guard
func isNotSupport(err error) bool { return errors.Is(err, errs.NotSupport) } Try / catch
err := d.Move(ctx, src, dst)
if errors.Is(err, errs.NotSupport) {
err = copyThenDelete(ctx, src, dst) // documented fallback for move
} Prevention
- Differentiate NotSupport (impossible) from NotImplement (unbuilt) in handling
- Hide fundamentally unsupported actions rather than erroring at click time
- Where move is unsupported, offer copy+delete flows explicitly
When it happens
Trigger: Calling an operation the provider cannot do — e.g. Move on a driver whose remote API has no move endpoint, upload to a write-protected backend, or a link-type the account tier disallows — where the driver explicitly returns errs.NotSupport.
Common situations: Users attempting move/copy/upload on read-only or link-based storages; frontends not filtering actions by driver capability; version upgrades reclassifying operations from supported to unsupported due to API changes.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/278b3f1fec15a994.
Report an issue: GitHub.