def _HandleResponse(method, response):
 if (response.code != 200):
  raise AdminAPIError(('%s failed: %s' % (method, response.read())))
 else:
  response_dict = json.loads(response.read())
  if ('error' in response_dict):
   raise AdminAPIError(('%s failed: %s' % (method, response_dict['error']['message'])))
  return response_dict

def _HandleResponse ( method , response ) : if ( response . code != 200 ) : raise AdminAPIError ( ( '%s failed: %s' % ( method , response . read ( ) ) ) ) else : response_dict = json . loads ( response . read ( ) ) if ( 'error' in response_dict ) : raise AdminAPIError ( ( '%s failed: %s' % ( method , response_dict [ 'error' ] [ 'message' ] ) ) ) return response_dict
verifies the response and returns the json dict of the response body on success .