getThemeErrors = async function getThemeErrors(themeName) {
    try {
        const cachedThemeErrors = await gscanCacheStore.get(themeName);
        if (cachedThemeErrors) {
            return cachedThemeErrors;
        }
    } catch (err) {
        logging.error('Failed to get gscan result from cache');
        logging.error(err);
    }

    const loadedTheme = list.get(themeName);

    if (!loadedTheme) {
        throw new errors.ValidationError({
            message: tpl(messages.themeNotLoaded, {themeName: themeName}),
            errorDetails: themeName
        });
    }

    const result = await check(themeName, loadedTheme);
    return getErrorsFromCheckedTheme(result);
}
Returns the last cached errors and warnings of check() if available.
Otherwise runs check() on the loaded theme with that name (which will always cache the error and warning results)
@returns {Promise<{errors: Array, warnings: Array}>}