1. 18 Apr, 2017 3 commits
    • Aaron Gable's avatar
      Reland "Refactor ReadHttpResponse to be error-friendlier" · 19ee16c8
      Aaron Gable authored
      Gerrit sometimes returns a full response json object at
      the same time as returning a non-200 status code. This
      refactor makes it easier for calling code to request
      access to that object and handle error cases on its own.
      
      The original version of this commit had a bug where
      ReadHttpResponse properly set the default value for
      accept_statuses, but all calls which came through
      ReadHttpJsonResponse were setting None instead.
      
      Bug: 710028
      Change-Id: I8cee435d8acd487fb777b3fd69b5e48e19d2e5a3
      Reviewed-on: https://chromium-review.googlesource.com/481060Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
      Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
      Commit-Queue: Aaron Gable <agable@chromium.org>
      19ee16c8
    • Aaron Gable's avatar
      Revert "Refactor ReadHttpResponse to be error-friendlier" · 382674be
      Aaron Gable authored
      This reverts commit 6d7ab1bf.
      
      Reason for revert: Stacktrace:
       File "/s/depot_tools/gerrit_util.py", line 816, in GetAccountDetails
         return ReadHttpJsonResponse(conn)
       File "/s/depot_tools/gerrit_util.py", line 376, in ReadHttpJsonResponse
         fh = ReadHttpResponse(conn, accept_statuses)
       File "/s/depot_tools/gerrit_util.py", line 365, in ReadHttpResponse
         if response.status not in accept_statuses:
      TypeError: argument of type 'NoneType' is not iterable
      
      Original change's description:
      > Refactor ReadHttpResponse to be error-friendlier
      > 
      > Gerrit sometimes returns a full response json object at
      > the same time as returning a non-200 status code. This
      > refactor makes it easier for calling code to request
      > access to that object and handle error cases on its own.
      > 
      > Bug: 710028
      > Change-Id: Id1017d580d2fb843d5ca6287efcfed8775c52cd6
      > Reviewed-on: https://chromium-review.googlesource.com/479450
      > Commit-Queue: Aaron Gable <agable@chromium.org>
      > Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
      > 
      
      TBR=agable@chromium.org,tandrii@chromium.org,chromium-reviews@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Change-Id: Ia9d9ce835e207a32e7cc8ee35c0cf40c823c7b78
      Reviewed-on: https://chromium-review.googlesource.com/481059Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
      Commit-Queue: Aaron Gable <agable@chromium.org>
      382674be
    • Aaron Gable's avatar
      Refactor ReadHttpResponse to be error-friendlier · 6d7ab1bf
      Aaron Gable authored
      Gerrit sometimes returns a full response json object at
      the same time as returning a non-200 status code. This
      refactor makes it easier for calling code to request
      access to that object and handle error cases on its own.
      
      Bug: 710028
      Change-Id: Id1017d580d2fb843d5ca6287efcfed8775c52cd6
      Reviewed-on: https://chromium-review.googlesource.com/479450
      Commit-Queue: Aaron Gable <agable@chromium.org>
      Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
      6d7ab1bf
  2. 16 Dec, 2016 1 commit
  3. 17 Jun, 2016 1 commit
  4. 16 Jun, 2016 1 commit
  5. 17 Oct, 2013 1 commit
  6. 16 Oct, 2013 1 commit