def extract_first_value_in_quotes(line, quote_mark):
    """
    Extracts first value in quotes (single or double) from a string.
    Line is left-stripped from whitespaces before extraction.
    :param line: string
    :param quote_mark: type of quotation mark: ' or "
    :return: Dict: 'value': extracted value;
                    'remainder': the remainder after extraction
                    'error' empty string if success or 'syntax' otherwise;
    """
    line = line.lstrip()
    result = {'value': '', 'remainder': line, 'error': 'syntax'}
    if len(line) < 2:
        return result
    if line[0] != quote_mark:
        return result
    next_qm_pos = line.find(quote_mark, 1)
    if next_qm_pos == -1:
        return result
    result['value'] = line[1:next_qm_pos]
    result['remainder'] = line[next_qm_pos + 1:]
    result['error'] = ''
    return result