{"record":{"id":"d496156a0dfe3430","repo":"JuliusBrussee/caveman","slug":"redact-payload-exceeds-redaction-size-limit","errorCode":null,"errorMessage":"redact: payload exceeds redaction size limit","messagePattern":"redact: payload exceeds redaction size limit","errorType":"error_code","errorClass":"ErrBodyTooLarge","httpStatus":null,"severity":"error","filePath":"shared/platform/redact/payload.go","lineNumber":68,"sourceCode":"// than being silently ignored, because ignoring a rule an operator configured\n// is exactly how unredacted data leaks.\nconst (\n\tRuleTypeRegex    = \"regex\"\n\tRuleTypeJSONPath = \"json_path\"\n\tRuleTypeHeader   = \"header\"\n\tRuleTypeBuiltin  = \"builtin\"\n)\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//","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/redact/payload.go#L50-L86","documentation":"Error \"redact: payload exceeds redaction size limit\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/redact/payload.go:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the payload below the redaction size limit."],"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"}