{"record":{"id":"2be4d748fa098f44","repo":"AlistGo/alist","slug":"storage-class-is-required","errorCode":null,"errorMessage":"storage_class is required","messagePattern":"storage_class is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/s3/other.go","lineNumber":91,"sourceCode":"\tcase \"archive_status\":\n\t\treturn d.archiveStatus(ctx, args)\n\tcase \"thaw\":\n\t\treturn d.thaw(ctx, args)\n\tcase \"thaw_status\":\n\t\treturn d.thawStatus(ctx, args)\n\tdefault:\n\t\treturn nil, errs.NotSupport\n\t}\n}\n\nfunc (d *S3) archive(ctx context.Context, args model.OtherArgs) (interface{}, error) {\n\tkey := getKey(args.Obj.GetPath(), false)\n\tpayload := ArchiveRequest{}\n\tif err := DecodeOtherArgs(args.Data, &payload); err != nil {\n\t\treturn nil, fmt.Errorf(\"parse archive request: %w\", err)\n\t}\n\tif payload.StorageClass == \"\" {\n\t\treturn nil, fmt.Errorf(\"storage_class is required\")\n\t}\n\tstorageClass := NormalizeStorageClass(payload.StorageClass)\n\tinput := &s3.CopyObjectInput{\n\t\tBucket:            &d.Bucket,\n\t\tKey:               &key,\n\t\tCopySource:        aws.String(url.PathEscape(d.Bucket + \"/\" + key)),\n\t\tMetadataDirective: aws.String(s3.MetadataDirectiveCopy),\n\t\tStorageClass:      aws.String(storageClass),\n\t}\n\tcopyReq, output := d.client.CopyObjectRequest(input)\n\tcopyReq.SetContext(ctx)\n\tif err := copyReq.Send(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tresp := ArchiveResponse{\n\t\tAction:       \"archive\",\n\t\tObject:       d.describeObject(args.Obj, key),","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/s3/other.go#L73-L109","documentation":"Error \"storage_class is required\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/s3/other.go:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply the required field in the request or storage configuration and retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}