def __format_error(self, error_list_tag):
    """Format this error into a JSON response.

    Args:
      error_list_tag: A string specifying the name of the tag to use for the
        error list.

    Returns:
      A dict containing the reformatted JSON error response.
    """
    error = {'domain': self.domain(),
             'reason': self.reason(),
             'message': self.message()}
    error.update(self.extra_fields() or {})
    return {'error': {error_list_tag: [error],
                      'code': self.status_code(),
                      'message': self.message()}}
def __format_error ( self , error_list_tag ) : error = { 'domain' : self . domain ( ) , 'reason' : self . reason ( ) , 'message' : self . message ( ) } error . update ( self . extra_fields ( ) or { } ) return { 'error' : { error_list_tag : [ error ] , 'code' : self . status_code ( ) , 'message' : self . message ( ) } }
Format this error into a JSON response.

    Args:
      error_list_tag: A string specifying the name of the tag to use for the
        error list.

    Returns:
      A dict containing the reformatted JSON error response.