{"record":{"id":"3f516a39a11d6f67","repo":"JuliusBrussee/caveman","slug":"redact-unsupported-redaction-rule-type","errorCode":null,"errorMessage":"redact: unsupported redaction rule type","messagePattern":"redact: unsupported redaction rule type","errorType":"error_code","errorClass":"ErrRuleUnsupported","httpStatus":null,"severity":"error","filePath":"shared/platform/redact/payload.go","lineNumber":75,"sourceCode":")\n\n// Origin values distinguish the built-in floor from operator-supplied rules in\n// the report.\nconst (\n\tOriginBuiltin = \"builtin\"\n\tOriginOrg     = \"org\"\n)\n\nvar (\n\t// ErrBodyTooLarge means the body exceeded MaxPayloadBytes.\n\tErrBodyTooLarge = errors.New(\"redact: payload exceeds redaction size limit\")\n\t// ErrInvalidRule means a rule could not be compiled or was structurally\n\t// unusable (empty name/pattern, or a pattern that matches the empty\n\t// string and would therefore rewrite the entire body).\n\tErrInvalidRule = errors.New(\"redact: invalid redaction rule\")\n\t// ErrRuleUnsupported means the rule's type is not implementable against an\n\t// opaque body by this pass.\n\tErrRuleUnsupported = errors.New(\"redact: unsupported redaction rule type\")\n)\n\n// Rule is one enabled row of the redaction_rules table, minus the columns that\n// are the caller's business. Field names and JSON tags are pinned to that\n// table's columns so the two cannot drift.\n//\n// Deliberately absent:\n//   - id / organization_id / project_id — tenancy is the caller's concern.\n//   - enabled — filtering disabled rows is the caller's concern; a rule that\n//     reaches Payload is a rule that runs.\n//\n// A row with rule_type='builtin' is accepted and treated as a no-op reference:\n// the built-in floor is unconditional, so such a row can neither add to nor\n// subtract from it.\ntype Rule struct {\n\tName        string `json:\"name\"`\n\tType        string `json:\"rule_type\"`\n\tPattern     string `json:\"pattern\"`","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/redact/payload.go#L57-L93","documentation":"Error \"redact: unsupported redaction rule type\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/redact/payload.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported redaction rule type."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}