{"record":{"id":"35cc5c65d56981c7","repo":"vectordotdev/vector","slug":"could-not-parse-path","errorCode":null,"errorMessage":"could not parse path","messagePattern":"could not parse path","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/codecs/src/encoding/format/cef.rs","lineNumber":253,"sourceCode":"        docs::additional_props_description = \"This is a path that points to the extension value of a log event.\",\n        docs::required = true,\n    ))]\n    pub extensions: HashMap<String, ConfigTargetPath>,\n    // TODO: use Template instead of ConfigTargetPath.\n    //   Templates are in the src/ package, and codes are in the lib/codecs.\n    //   Moving the Template to the lib/ package in order to prevent the circular dependency.\n}\n\nimpl Default for CefSerializerOptions {\n    fn default() -> Self {\n        Self {\n            version: Version::default(),\n            device_vendor: String::from(DEFAULT_DEVICE_VENDOR),\n            device_product: String::from(DEFAULT_DEVICE_PRODUCT),\n            device_version: String::from(DEFAULT_DEVICE_VERSION),\n            device_event_class_id: String::from(DEFAULT_EVENT_CLASS_ID),\n            severity: ConfigTargetPath::try_from(\"cef.severity\".to_string())\n                .expect(\"could not parse path\"),\n            name: ConfigTargetPath::try_from(\"cef.name\".to_string()).expect(\"could not parse path\"),\n            extensions: HashMap::new(),\n        }\n    }\n}\n\n/// Serializer that converts an `Event` to the bytes using the CEF format.\n/// CEF:{version}|{device_vendor}|{device_product}|{device_version>|{device_event_class}|{name}|{severity}|{encoded_fields}\n#[derive(Debug, Clone)]\npub struct CefSerializer {\n    version: Version,\n    device: DeviceSettings,\n    severity: ConfigTargetPath,\n    name: ConfigTargetPath,\n    extensions: HashMap<String, ConfigTargetPath>,\n}\n\nimpl CefSerializer {","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/lib/codecs/src/encoding/format/cef.rs#L235-L271","documentation":"This panic occurs in the CEF serializer's `Default`/default-config constructor when `ConfigTargetPath::try_from(\"cef.severity\")` fails to parse. Target paths must be valid event path expressions; the library hardcodes these literals so failure is treated as an impossible internal invariant break.","triggerScenarios":"Constructing the default CEF serializer config (e.g. `CefFields::default()` or the public `Self` constructor) when the path parser rejects the literal `\"cef.severity\"` — only possible if the path grammar or parser changed.","commonSituations":"Essentially unreachable for library users; could surface after a Vector version change that alters the accepted path syntax (e.g. stricter parsing rules for key names).","solutions":["Confirm you are on an unmodified build; this literal is hardcoded and should always parse","Check for a recent Vector/codecs version change to path parsing rules and downgrade or upgrade accordingly","Open an issue with the version and stack trace if it reproduces"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin consistent versions of the codecs crate","Read changelogs for target-path grammar changes before upgrading","Report any occurrence with a stack trace — it indicates a library bug"],"tags":["panic","cef","path-parsing","internal-invariant"],"backgroundTag":"invalid-path-expression","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}