{"record":{"id":"cea07b235a76ed5a","repo":"openai/codex","slug":"starlark-error-0","errorCode":null,"errorMessage":"starlark error: {0}","messagePattern":"starlark error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"codex-rs/execpolicy/src/error.rs","lineNumber":49,"sourceCode":"    InvalidExample(String),\n    #[error(\"invalid rule: {0}\")]\n    InvalidRule(String),\n    #[error(\n        \"expected every example to match at least one rule. rules: {rules:?}; unmatched examples: \\\n         {examples:?}\"\n    )]\n    ExampleDidNotMatch {\n        rules: Vec<String>,\n        examples: Vec<String>,\n        location: Option<ErrorLocation>,\n    },\n    #[error(\"expected example to not match rule `{rule}`: {example}\")]\n    ExampleDidMatch {\n        rule: String,\n        example: String,\n        location: Option<ErrorLocation>,\n    },\n    #[error(\"starlark error: {0}\")]\n    Starlark(StarlarkError),\n}\n\nimpl Error {\n    pub fn with_location(self, location: ErrorLocation) -> Self {\n        match self {\n            Error::ExampleDidNotMatch {\n                rules,\n                examples,\n                location: None,\n            } => Error::ExampleDidNotMatch {\n                rules,\n                examples,\n                location: Some(location),\n            },\n            Error::ExampleDidMatch {\n                rule,\n                example,","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/execpolicy/src/error.rs#L31-L67","documentation":"Wraps a Starlark interpreter error raised while evaluating the policy's Starlark source — syntax errors, undefined functions, or runtime failures inside the policy script. The payload carries the interpreter's message.","triggerScenarios":"Thrown at codex-rs/execpolicy/src/error.rs:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped Starlark message for the script location and cause","Fix the syntax or runtime error in the policy's Starlark source","Verify any functions called in the script are defined and permitted by the Starlark environment"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}