Skip to content

Commit

Permalink
Print response from the server on HTTP errors from Rietveld
Browse files Browse the repository at this point in the history
This will make explanation provided by Rietveld visible to the user, e.g.
"Request to https://codereview.chromium.org/1386443003/edit_flags failed: Cannot
set commit on an issue that does not have a commit queue".

[email protected]
BUG=529339

Review URL: https://codereview.chromium.org/1387833002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297009 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rryk committed Oct 5, 2015
1 parent c15d2a0 commit e4d195a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rietveld.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,9 @@ def trap_http_500(msg):
raise
# If reaching this line, loop again. Uses a small backoff.
time.sleep(min(10, 1+retry*2))
except urllib2.HTTPError as e:
print 'Request to %s failed: %s' % (e.geturl(), e.read())
raise
finally:
upload.ErrorExit = old_error_exit

Expand Down

0 comments on commit e4d195a

Please sign in to comment.