Made internal client handle failed requests better

In two places, the internal client was not doing what it should with failed requests.

Change-Id: I49e566108fe920d85ca60fe76d24debe8ec7ffad
Merge "Made internal client handle failed requests better"