def METHOD_NAME(self, response, payload):
    if response.code == 401:
        raise GCMAuthenticationError("Authentication Error")
    result = Result(response, payload)
    if 500 <= response.code <= 599:
        result.retry_message = payload
        return result
    # Fetch the content body
    d = response.text()
    d.addCallback(result.parse_response, response.code, payload)
    return d