Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 558aaff

Browse filesBrowse files
michaelbabynjonmmease
authored andcommitted
retry on 429 throttled status (plotly#1307)
* retry on 429 throttled status * Added comment describing main source of 429 errors
1 parent a9fa5de commit 558aaff
Copy full SHA for 558aaff

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎plotly/api/v2/utils.py

Copy file name to clipboardExpand all lines: plotly/api/v2/utils.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def get_headers():
114114
def should_retry(exception):
115115
if isinstance(exception, exceptions.PlotlyRequestError):
116116
if (isinstance(exception.status_code, int) and
117-
500 <= exception.status_code < 600):
118-
# Retry on 5XX errors.
117+
(500 <= exception.status_code < 600 or exception.status_code == 429)):
118+
# Retry on 5XX and 429 (image export throttling) errors.
119119
return True
120120
elif 'Uh oh, an error occurred' in exception.message:
121121
return True

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.