{"record":{"id":"b4379359fd578c1b","repo":"AlistGo/alist","slug":"range-out-of-bounds","errorCode":null,"errorMessage":"range out of bounds","messagePattern":"range out of bounds","errorType":"validation","errorClass":null,"httpStatus":416,"severity":"error","filePath":"drivers/proton_drive/util.go","lineNumber":347,"sourceCode":"\t\t\t\tstart, err = strconv.ParseInt(parts[0], 10, 64)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tend = size - 1\n\t\t\t} else {\n\t\t\t\t// Full range (e.g., \"0-1023\")\n\t\t\t\tstart, err = strconv.ParseInt(parts[0], 10, 64)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tend, err = strconv.ParseInt(parts[1], 10, 64)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif start >= size || end >= size || start > end {\n\t\t\t\treturn nil, fmt.Errorf(\"range out of bounds\")\n\t\t\t}\n\n\t\t\tresult = append(result, httpRange{start: start, end: end})\n\t\t}\n\t}\n\n\treturn result, nil\n}\n\nfunc (d *ProtonDrive) encryptFileName(ctx context.Context, name string, parentLinkID string) (string, error) {\n\n\tparentLink, err := d.getLink(ctx, parentLinkID)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to get parent link: %w\", err)\n\t}\n\n\t// Get parent node keyring\n\tparentNodeKR, err := d.getLinkKR(ctx, parentLink)","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/util.go#L329-L365","documentation":"Error \"range out of bounds\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/util.go:347 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send a valid HTTP Range header within the file size bounds and retry the request."],"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"}