We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d96f962 commit b451725Copy full SHA for b451725
1 file changed
dvuploader/nativeupload.py
@@ -459,7 +459,16 @@ async def _update_single_metadata(
459
else:
460
await asyncio.sleep(1.0)
461
462
- raise ValueError(f"Failed to update metadata for file {file.file_name}.")
+ if "message" in response.json():
463
+ # If the response is a JSON object, we can get the error message from the "message" key.
464
+ error_message = response.json()["message"]
465
+ else:
466
+ # If the response is not a JSON object, we can get the error message from the response text.
467
+ error_message = response.text
468
+
469
+ raise ValueError(
470
+ f"Failed to update metadata for file {file.file_name}: {error_message}"
471
+ )
472
473
474
def _retrieve_file_ids(
0 commit comments