def result_has_error(results):
    """
    Check the results list for any possible error and return a tuple which
    contains the status and error message. If the record contains a Plural
    attribute, multiple API calls may be performed for a single record.

    Args:
        results: List of API responses

    Returns:
        error_stat: Boolean to check if the expected 'stat' index exists in
            response
        error_result: Boolean for the status of the API call
        error_msg: Error message String
    """
    for result in results:
        if 'stat' not in result:
            return True, False, "Unexpected API response"
        elif result['stat'] == "error":
            return False, True, result['error_description']
    return False, False, ""