Skip to content

Commit

Permalink
Chore: investigate if the retry mechanism is working on 404 and integ… (
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber committed Aug 15, 2023
1 parent a5b090b commit 2b8ddd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion env0/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func configureProvider(version string, p *schema.Provider) schema.ConfigureConte

// When running integration tests 404 may occur due to "database eventual consistency".
// Retry when there's a 5xx error. Otherwise do not retry.
if r.StatusCode() >= 500 || isIntegrationTest && r.StatusCode() == 404 {
if r.StatusCode() >= 500 || (isIntegrationTest && r.StatusCode() == 404) {
log.Printf("[WARN] Received %d status code, retrying request: %s %s", r.StatusCode(), r.Request.Method, r.Request.URL)
return true
}
Expand Down

0 comments on commit 2b8ddd5

Please sign in to comment.