Skip to content

Commit

Permalink
Merge pull request #73 from Asana/default-retry-after-value
Browse files Browse the repository at this point in the history
Default to 60 seconds for Retry-After
  • Loading branch information
joetrollo authored Aug 14, 2018
2 parents f1e5b09 + fb317a6 commit f518cce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/asana/errors/RateLimitEnforcedError.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public RateLimitEnforcedError(HttpResponseException exception) {
List<String> headers = (List<String>) exception.getHeaders().get("retry-after");
retryAfter = (long) (1000 * Float.parseFloat((String) headers.get(0)));
} catch (Exception e) {
retryAfter = -1;
retryAfter = 60 * 1000;
}
}
}
}

0 comments on commit f518cce

Please sign in to comment.