对齐 Api 与 Request 的可重试状态码
TripoError::is_retryable 的 Api 分支补充 408 与 425,与 Request 分支的可重试集合保持一致
This commit is contained in:
@@ -150,7 +150,7 @@ impl std::error::Error for TripoError {}
|
||||
impl TripoError {
|
||||
pub fn is_retryable(&self) -> bool {
|
||||
match self {
|
||||
Self::Api { status, .. } => matches!(status, Some(429 | 500..=599)),
|
||||
Self::Api { status, .. } => matches!(status, Some(408 | 425 | 429 | 500..=599)),
|
||||
Self::Request { status, .. } => {
|
||||
status.is_none() || matches!(status, Some(408 | 425 | 429 | 500..=599))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user