{"record":{"id":"f5e52a802d3f375b","repo":"projectdiscovery/nuclei","slug":"dataformat-is-required","errorCode":null,"errorMessage":"dataformat is required","messagePattern":"dataformat is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/fuzz/dataformat/dataformat.go","lineNumber":92,"sourceCode":"\t\tif dataformat.IsType(data) {\n\t\t\tdecoded, err := dataformat.Decode(data)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tvalue := &Decoded{\n\t\t\t\tDataFormat: dataformat.Name(),\n\t\t\t\tData:       decoded,\n\t\t\t}\n\t\t\treturn value, nil\n\t\t}\n\t}\n\treturn nil, nil\n}\n\n// Encode encodes the data into a format\nfunc Encode(data KV, dataformat string) (string, error) {\n\tif dataformat == \"\" {\n\t\treturn \"\", errors.New(\"dataformat is required\")\n\t}\n\tif encoder, ok := dataformats[dataformat]; ok {\n\t\treturn encoder.Encode(data)\n\t}\n\treturn \"\", fmt.Errorf(\"dataformat %s is not supported\", dataformat)\n}\n","sourceCodeStart":74,"sourceCodeEnd":99,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/fuzz/dataformat/dataformat.go#L74-L99","documentation":"Error \"dataformat is required\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/fuzz/dataformat/dataformat.go:92 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"}