{"record":{"id":"5d67f940b69f0e67","repo":"rustfs/rustfs","slug":"invalid-filter-name-0-only-prefix-or-suffix","errorCode":null,"errorMessage":"Invalid filter name: {0}, only 'prefix' or 'suffix' is allowed","messagePattern":"Invalid filter name: (.+?), only 'prefix' or 'suffix' is allowed","errorType":"validation","errorClass":"ParseConfigError","httpStatus":null,"severity":"error","filePath":"crates/notify/src/rules/xml_config.rs","lineNumber":29,"sourceCode":"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse crate::rules::pattern;\nuse hashbrown::HashSet;\nuse rustfs_s3_types::EventName;\nuse rustfs_targets::arn::{ARN, ArnError, TargetIDError};\nuse serde::{Deserialize, Serialize};\nuse std::io::Read;\nuse thiserror::Error;\n\n#[derive(Debug, Error)]\npub enum ParseConfigError {\n    #[error(\"XML parsing error:{0}\")]\n    XmlError(#[from] quick_xml::errors::serialize::DeError),\n    #[error(\"Invalid filter value:{0}\")]\n    InvalidFilterValue(String),\n    #[error(\"Invalid filter name: {0}, only 'prefix' or 'suffix' is allowed\")]\n    InvalidFilterName(String),\n    #[error(\"There can only be one 'prefix' in the filter rule\")]\n    DuplicatePrefixFilter,\n    #[error(\"There can only be one 'suffix' in the filter rule\")]\n    DuplicateSuffixFilter,\n    #[error(\"Missing event name\")]\n    MissingEventName,\n    #[error(\"Duplicate event name:{0}\")]\n    DuplicateEventName(String), // EventName is usually an enum, and here String is used to represent its text\n    #[error(\"Repeated queue configuration: ID={0:?}, ARN={1}\")]\n    DuplicateQueueConfiguration(Option<String>, String),\n    #[error(\"Unsupported configuration types (e.g. Lambda, Topic)\")]\n    UnsupportedConfiguration,\n    #[error(\"ARN not found:{0}\")]\n    ArnNotFound(String),\n    #[error(\"Unknown area:{0}\")]\n    UnknownRegion(String),\n    #[error(\"ARN parsing error:{0}\")]","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/rustfs/rustfs/blob/35af688cd9d41b4346fbe27dcf7250ba72046c1f/crates/notify/src/rules/xml_config.rs#L11-L47","documentation":"ParseConfigError validation guard meaning a filter rule declared a name other than 'prefix' or 'suffix' — the S3 notification filter vocabulary allows only those two keys. The rejected name is embedded; the XML is rejected as invalid configuration rather than ignoring the unknown filter rule.","triggerScenarios":"Thrown at crates/notify/src/rules/xml_config.rs:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the filter rule name to 'prefix' or 'suffix'","Remove unsupported filter rules from the configuration"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35af688cd9d41b4346fbe27dcf7250ba72046c1f","analyzedAt":"2026-08-20T21:57:04.799Z","contentChangedAt":"2026-08-20T21:57:04.799Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}