'Updates abstract sk.SpinnakerStatus attributes from a Gate response.
This is called by the base class.
Args:
doc: [dict] JSON Document object read from response payload.'

def _update_response_from_json(self, doc):

    self.current_state = doc['status']
    self._bind_exception_details(None)
    exception_details = None
    gate_exception = None
    variables = doc.get('variables', None)
    if variables:
        for elem in variables:
            if (elem['key'] == 'exception'):
                value = elem['value']
                exception_details = value['details']
            elif (elem['key'] == 'kato.tasks'):
                value = elem['value']
                for task in value:
                    if ('exception' in task):
                        gate_exception = task['exception']['message']
                        break
    self._bind_exception_details((exception_details or gate_exception))
