rustfs/rustfs · error · ParseConfigError

Invalid filter name: {0}, only 'prefix' or 'suffix' is allow

Error message

Invalid filter name: {0}, only 'prefix' or 'suffix' is allowed

What it means

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.

Source

Thrown at crates/notify/src/rules/xml_config.rs:29

// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::rules::pattern;
use hashbrown::HashSet;
use rustfs_s3_types::EventName;
use rustfs_targets::arn::{ARN, ArnError, TargetIDError};
use serde::{Deserialize, Serialize};
use std::io::Read;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum ParseConfigError {
    #[error("XML parsing error:{0}")]
    XmlError(#[from] quick_xml::errors::serialize::DeError),
    #[error("Invalid filter value:{0}")]
    InvalidFilterValue(String),
    #[error("Invalid filter name: {0}, only 'prefix' or 'suffix' is allowed")]
    InvalidFilterName(String),
    #[error("There can only be one 'prefix' in the filter rule")]
    DuplicatePrefixFilter,
    #[error("There can only be one 'suffix' in the filter rule")]
    DuplicateSuffixFilter,
    #[error("Missing event name")]
    MissingEventName,
    #[error("Duplicate event name:{0}")]
    DuplicateEventName(String), // EventName is usually an enum, and here String is used to represent its text
    #[error("Repeated queue configuration: ID={0:?}, ARN={1}")]
    DuplicateQueueConfiguration(Option<String>, String),
    #[error("Unsupported configuration types (e.g. Lambda, Topic)")]
    UnsupportedConfiguration,
    #[error("ARN not found:{0}")]
    ArnNotFound(String),
    #[error("Unknown area:{0}")]
    UnknownRegion(String),
    #[error("ARN parsing error:{0}")]

View on GitHub (pinned to 35af688cd9)

Solutions

  1. Change the filter rule name to 'prefix' or 'suffix'
  2. Remove unsupported filter rules from the configuration
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/notify/src/rules/xml_config.rs:29 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rustfs/rustfs@35af688cd9 (2026-08-20). Data as JSON: /api/errors/5d67f940b69f0e67. Report an issue: GitHub.