Skip to main content

extract_storage_class

Function extract_storage_class 

Source
fn extract_storage_class(message: &str) -> String
Expand description

Extract the storage class name from a provider error message.

Provider messages typically look like: "The storage class GLACIER is not supported for this operation" "NoSuchTransition for STANDARD_IA"

The heuristic: find the first token after a known sentinel word that looks like a storage class (all uppercase letters, digits, underscores, at least 3 chars). Falls back to "UNKNOWN" when nothing matches.