Reformatted
Throw a more appropriate exception on http status code != 200