Error handling for HTTP 4xx and 5xx responses

Client now throws an HttpError when handling HTTP responses with a
status in the 400 and 500 ranges.

Change-Id: Ifb3aa6025f135ea9138a9ffe9eba07da4091796e
Bug: 70193