Skip to content

Commit

Permalink
Merge pull request #342 from roboflow/leo/fix-error-handling
Browse files Browse the repository at this point in the history
Check that responsejson is instance of dict
  • Loading branch information
stellasphere authored Feb 13, 2025
2 parents 3130988 + e035b74 commit e0d53e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roboflow/adapters/rfapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def upload_image(
pass

if response.status_code != 200:
if responsejson:
if responsejson and isinstance(responsejson, dict):
err_msg = responsejson

if err_msg.get("error"):
Expand Down

0 comments on commit e0d53e8

Please sign in to comment.