]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-var-expand: Prefix provider errors with provider prefix
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 3 Feb 2025 09:28:23 +0000 (11:28 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:16 +0000 (12:34 +0200)
src/lib-var-expand/var-expand.c

index d1e3e20525f54c022199accc79b6c43864110e06..35955b264774dbba7844932e30b83f25d2eeb525 100644 (file)
@@ -390,6 +390,9 @@ static int call_value_provider(const struct var_expand_state *state,
        if (!found) {
                *error_r = t_strdup_printf("Unsupported prefix '%s'", prefix);
                ret = -1;
+       } else if (ret == -1) {
+               /* Add prefix to errors */
+               *error_r = t_strdup_printf("%s: %s", prefix, *error_r);
        }
 
        i_assert(*value_r != NULL || ret == -1);