{"record":{"id":"acc1b75347e3f027","repo":"projectdiscovery/nuclei","slug":"input-file-is-empty","errorCode":null,"errorMessage":"input file is empty","messagePattern":"input file is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/input/provider/http/multiformat.go","lineNumber":85,"sourceCode":"\t\t\treturn nil, errors.Wrap(err, \"could not open input file\")\n\t\t}\n\t\tinputFile = file\n\t\tinputReader = file\n\t} else {\n\t\tinputReader = strings.NewReader(opts.InputContents)\n\t}\n\tdefer func() {\n\t\tif inputFile != nil {\n\t\t\t_ = inputFile.Close()\n\t\t}\n\t}()\n\n\tdata, err := io.ReadAll(inputReader)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"could not read input file\")\n\t}\n\tif len(data) == 0 {\n\t\treturn nil, errors.New(\"input file is empty\")\n\t}\n\n\tparseErr := format.Parse(bytes.NewReader(data), func(request *types.RequestResponse) bool {\n\t\tcount++\n\t\treturn false\n\t}, opts.InputFile)\n\tif parseErr != nil {\n\t\treturn nil, errors.Wrap(parseErr, \"could not parse input file\")\n\t}\n\treturn &HttpInputProvider{format: format, inputData: data, inputFile: opts.InputFile, count: count}, nil\n}\n\n// Count returns the number of items for input provider\nfunc (i *HttpInputProvider) Count() int64 {\n\treturn i.count\n}\n\n// Iterate over all inputs in order","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/input/provider/http/multiformat.go#L67-L103","documentation":"Error \"input file is empty\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/input/provider/http/multiformat.go:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}