pub fn is_bad_sequence_error(error_msg: &str) -> bool
Detects if an error is due to a bad sequence number. Checks both string matching on the error message and XDR decoding when available.