AlistGo/alist · error

storage_class is required

Error message

storage_class is required

What it means

Error "storage_class is required" thrown in AlistGo/alist.

Source

Thrown at drivers/s3/other.go:91

	case "archive_status":
		return d.archiveStatus(ctx, args)
	case "thaw":
		return d.thaw(ctx, args)
	case "thaw_status":
		return d.thawStatus(ctx, args)
	default:
		return nil, errs.NotSupport
	}
}

func (d *S3) archive(ctx context.Context, args model.OtherArgs) (interface{}, error) {
	key := getKey(args.Obj.GetPath(), false)
	payload := ArchiveRequest{}
	if err := DecodeOtherArgs(args.Data, &payload); err != nil {
		return nil, fmt.Errorf("parse archive request: %w", err)
	}
	if payload.StorageClass == "" {
		return nil, fmt.Errorf("storage_class is required")
	}
	storageClass := NormalizeStorageClass(payload.StorageClass)
	input := &s3.CopyObjectInput{
		Bucket:            &d.Bucket,
		Key:               &key,
		CopySource:        aws.String(url.PathEscape(d.Bucket + "/" + key)),
		MetadataDirective: aws.String(s3.MetadataDirectiveCopy),
		StorageClass:      aws.String(storageClass),
	}
	copyReq, output := d.client.CopyObjectRequest(input)
	copyReq.SetContext(ctx)
	if err := copyReq.Send(); err != nil {
		return nil, err
	}

	resp := ArchiveResponse{
		Action:       "archive",
		Object:       d.describeObject(args.Obj, key),

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Supply the required field in the request or storage configuration and retry the operation.

When it happens

Trigger: Thrown at drivers/s3/other.go:91 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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