MCPcopy Create free account
hub / github.com/apache/impala / HttpError

Class HttpError

shell/impala_shell/shell_exceptions.py:64–76  ·  view source on GitHub ↗

An error containing an http response code and a possible message body

Source from the content-addressed store, hash-verified

62
63
64class HttpError(Exception):
65 """An error containing an http response code and a possible message body"""
66 def __init__(self, code, message, body, http_headers):
67 self.code = code
68 self.message = message
69 self.body = body
70 self.http_headers = http_headers
71
72 def __str__(self):
73 if not self.body:
74 return "HTTP code {}: {}".format(self.code, self.message)
75 else:
76 return "HTTP code {}: {} [{}]".format(self.code, self.message, self.body)

Callers 2

flushMethod · 0.90
_check_codeMethod · 0.90

Calls

no outgoing calls

Tested by 1

_check_codeMethod · 0.72