AlistGo/alist · error

parse archive request: %w

Error message

parse archive request: %w

What it means

Error "parse archive request: %w" thrown in AlistGo/alist.

Source

Thrown at drivers/s3/other.go:88

	switch strings.ToLower(strings.TrimSpace(args.Method)) {
	case "archive":
		return d.archive(ctx, args)
	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
	}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry.

When it happens

Trigger: Thrown at drivers/s3/other.go:88 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/1799dddf1a7ea2a8. Report an issue: GitHub.