in mns/mns_client.py [0:0]
def check_status(self, req_inter, resp_inter, resp, decoder=ErrorDecoder):
if resp_inter.status >= 200 and resp_inter.status < 400:
resp.error_data = ""
else:
resp.error_data = resp_inter.data
if resp_inter.status >= 400 and resp_inter.status <= 600:
excType, excMessage, reqId, hostId, subErr = decoder.decodeError(resp.error_data, req_inter.get_req_id())
if reqId is None:
reqId = resp.header["x-mns-request-id"]
raise MNSServerException(excType, excMessage, reqId, hostId, subErr)
else:
raise MNSClientNetworkException("UnkownError", resp_inter.data, req_inter.get_req_id())