Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt Throttling to Outscale API #30

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

outscale-mdr
Copy link
Contributor

closes #24

if strings.Contains(fmt.Sprint(err), "RequestLimitExceeded:") {
return true
for _, errorCode := range ThrottlingErrors {
if strings.Contains(fmt.Sprint(errorCode), fmt.Sprint(err)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using fmt.Sprint(err) to match http error code seems dangerous. Can we get the real http code instead ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, changed to store these info in a custom structure

@outscale-mdr outscale-mdr merged commit 19cf3e8 into outscale:master Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support of Throttling
2 participants