{"record":{"id":"8aa4221ce6926f35","repo":"projectdiscovery/nuclei","slug":"value-cannot-be-empty","errorCode":null,"errorMessage":"value cannot be empty","messagePattern":"value cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/authprovider/authx/file.go","lineNumber":160,"sourceCode":"\t\t\t}\n\t\t}\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid type: %s\", s.Type)\n\t}\n\treturn nil\n}\n\ntype KV struct {\n\tKey   string `json:\"key\" yaml:\"key\"` // Header key (preserves exact casing)\n\tValue string `json:\"value\" yaml:\"value\"`\n}\n\nfunc (k *KV) Validate() error {\n\tif k.Key == \"\" {\n\t\treturn fmt.Errorf(\"key cannot be empty\")\n\t}\n\tif k.Value == \"\" {\n\t\treturn fmt.Errorf(\"value cannot be empty\")\n\t}\n\treturn nil\n}\n\ntype Cookie struct {\n\tKey   string `json:\"key\" yaml:\"key\"`\n\tValue string `json:\"value\" yaml:\"value\"`\n\tRaw   string `json:\"raw\" yaml:\"raw\"`\n}\n\nfunc (c *Cookie) Validate() error {\n\tif c.Raw != \"\" {\n\t\treturn nil\n\t}\n\tif c.Key == \"\" {\n\t\treturn fmt.Errorf(\"key cannot be empty\")\n\t}\n\tif c.Value == \"\" {","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/authprovider/authx/file.go#L142-L178","documentation":"Error \"value cannot be empty\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/authprovider/authx/file.go:160 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-16T03:17:38.424Z"}