{"record":{"id":"931d262b2935c408","repo":"AlistGo/alist","slug":"chunk-too-short","errorCode":null,"errorMessage":"chunk too short","messagePattern":"chunk too short","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/mega/driver.go","lineNumber":183,"sourceCode":"\t\t\treturn err\n\t\t}\n\n\t\treader := driver.NewLimitedUploadStream(ctx, stream)\n\t\tfor id := 0; id < u.Chunks(); id++ {\n\t\t\tif utils.IsCanceled(ctx) {\n\t\t\t\treturn ctx.Err()\n\t\t\t}\n\t\t\t_, chkSize, err := u.ChunkLocation(id)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tchunk := make([]byte, chkSize)\n\t\t\tn, err := io.ReadFull(reader, chunk)\n\t\t\tif err != nil && err != io.EOF {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif n != len(chunk) {\n\t\t\t\treturn errors.New(\"chunk too short\")\n\t\t\t}\n\n\t\t\terr = u.UploadChunk(id, chunk)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tup(float64(id) * 100 / float64(u.Chunks()))\n\t\t}\n\n\t\t_, err = u.Finish()\n\t\treturn err\n\t}\n\treturn fmt.Errorf(\"unable to convert dir to mega n\")\n}\n\n//func (d *Mega) Other(ctx context.Context, args model.OtherArgs) (interface{}, error) {\n//\treturn nil, errs.NotSupport\n//}","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/mega/driver.go#L165-L201","documentation":"Error \"chunk too short\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/mega/driver.go:183 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage configuration and the provider's service status, fix the indicated cause, 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-15T22:17:37.221Z"}