extract_retry_after_from_error

Function extract_retry_after_from_error 

Source
pub fn extract_retry_after_from_error(error_msg: &str) -> Option<u64>
Expand description

What: Extract Retry-After value from error message string.

Inputs:

  • error_msg: Error message that may contain Retry-After information

Output:

  • Some(seconds) if Retry-After found in error message, None otherwise

Details:

  • Parses format: “error message (Retry-After: Ns)” where N is seconds.