fix: return error instead of silently ignoring invalid ARNs in notification config (#1528)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Audric
2026-01-16 16:12:55 +08:00
committed by GitHub
parent ed4329d50c
commit 548a39ffe7
3 changed files with 147 additions and 26 deletions
+2
View File
@@ -129,6 +129,8 @@ impl ARN {
}
/// Parsing ARN from string
/// Only accepts ARNs with the RustFS prefix: "arn:rustfs:sqs:"
/// Format: arn:rustfs:sqs:{region}:{id}:{name}
pub fn parse(s: &str) -> Result<Self, TargetError> {
if !s.starts_with(ARN_PREFIX) {
return Err(TargetError::InvalidARN(s.to_string()));