Skip to content

Commit 308deb7

Browse files
author
Matt Sokoloff
committed
retry 520s
1 parent bbf498e commit 308deb7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
# Version 3.35.0 (xxxx-xx-xx)
4+
### Fixed
5+
* Retry 520 errors when uploading files
6+
37
# Version 3.34.0 (2022-12-22)
48
### Added
59
* Added `get_by_name()` method to MetadataOntology object to access both custom and reserved metadata by name.

labelbox/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ def upload_data(self,
377377
raise labelbox.exceptions.InternalServerError(error_502)
378378
elif response.status_code == 503:
379379
raise labelbox.exceptions.InternalServerError(response.text)
380+
elif response.status_code == 520:
381+
raise labelbox.exceptions.InternalServerError(response.text)
380382

381383
try:
382384
file_data = response.json().get("data", None)
@@ -1161,9 +1163,9 @@ def get_data_row_ids_for_global_keys(
11611163
'Status' contains the outcome of this job. It can be one of
11621164
'Success', 'Partial Success', or 'Failure'.
11631165
1164-
'Results' contains a list of the fetched corresponding data row ids in the input order.
1165-
For data rows that cannot be fetched due to an error, or data rows that do not exist,
1166-
empty string is returned at the position of the respective global_key.
1166+
'Results' contains a list of the fetched corresponding data row ids in the input order.
1167+
For data rows that cannot be fetched due to an error, or data rows that do not exist,
1168+
empty string is returned at the position of the respective global_key.
11671169
More error information can be found in the 'Errors' section.
11681170
11691171
'Errors' contains a list of global_keys that could not be fetched, along

0 commit comments

Comments
 (0)