def handler(res): if res.status_code == 412: raise DocumentRevisionError(res) elif res.status_code == 404 and res.error_code == 1202: return None elif res.status_code not in HTTP_OK: raise DocumentGetError(res) return res.body['vertex']
def handler(res): if res.status_code in {304, 412}: raise DocumentRevisionError(res) elif res.status_code == 404 and res.error_code == 1202: return None elif res.status_code in HTTP_OK: return res.body raise DocumentGetError(res)
def handler(res): if res.status_code not in HTTP_OK: raise DocumentGetError(res) return Cursor(self._conn, res.body)
def handler(res): if res.status_code not in HTTP_OK: raise DocumentGetError(res) return res.body['document']