pyrax
Python Bindings for the Rackspace Cloud
|
def pyrax.exceptions.from_response | ( | response, | |
body | |||
) |
Return an instance of a ClientException or subclass based on an httplib2 response.
Usage::
resp, body = http.request(...) if resp.status != 200: raise exception_from_response(resp, body)
tuple _code_map |
00001 dict((c.http_status, c) for c in [BadRequest, Unauthorized, 00002 Forbidden, NotFound, OverLimit, HTTPNotImplemented])
ServerClientException = _nova_exceptions.ClientException |
ServerNotFound = _nova_exceptions.NotFound |