feat: Parse and use retryDelay from Google API RateLimitExceeded errors (#4124)
Signed-off-by: sings-to-bees-on-wednesdays <222684290+sings-to-bees-on-wednesdays@users.noreply.github.com> Co-authored-by: Jack Amadeo <jackamadeo@block.xyz> Co-authored-by: Jack Amadeo <jackamadeo@squareup.com>
This commit is contained in:
committed by
GitHub
parent
94cf5c85a0
commit
b5c133cecb
@@ -389,7 +389,7 @@ pub async fn get_provider_models(
|
||||
ProviderError::UsageError(_) => StatusCode::BAD_REQUEST,
|
||||
|
||||
// Transient errors - client should retry later
|
||||
ProviderError::RateLimitExceeded(_) => StatusCode::TOO_MANY_REQUESTS,
|
||||
ProviderError::RateLimitExceeded { .. } => StatusCode::TOO_MANY_REQUESTS,
|
||||
|
||||
// All other errors - internal server error
|
||||
_ => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user