Skip to content

Commit a17f88f

Browse files
committed
Improving error message for annotations updates
1 parent db2f057 commit a17f88f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bigml/api_handlers/sourcehandler.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,10 @@ def update_composite_annotations(self, source, images_file,
584584
source = self.update_source(source,
585585
{"row_values": new_batch})
586586
if source["error"] is not None:
587-
LOGGER.error("WARNING: Some annotations were not"
588-
" updated (%s)",
589-
new_batch)
587+
err_str = json.dumps(source["error"])
588+
v_str = json.dumps(new_batch)
589+
LOGGER.error("WARNING: Some annotations were not updated "
590+
f" (error: {err_str}, values: {v_str})")
590591
if not self.ok(source):
591592
raise Exception(
592593
f"Failed to update {len(new_batch)} annotations.")

0 commit comments

Comments
 (0)