diff --git a/pkg/operator/api/userconfig/validators.go b/pkg/operator/api/userconfig/validators.go index 1d9baf36b9..32caa15657 100644 --- a/pkg/operator/api/userconfig/validators.go +++ b/pkg/operator/api/userconfig/validators.go @@ -365,7 +365,7 @@ func CastInputValue(value interface{}, inputSchema *InputSchema) (interface{}, e valueMapCasted[typeSchemaKey] = valueValCasted } else { if !typeSchemaValue.(*InputSchema).Optional { - return nil, ErrorMustBeDefined(typeSchemaValue) + return nil, errors.Wrap(ErrorMustBeDefined(typeSchemaValue), s.UserStrStripped(typeSchemaKey)) } // don't set default (python has to) } @@ -537,7 +537,7 @@ func CastOutputValue(value interface{}, outputSchema OutputSchema) (interface{}, for typeSchemaKey, typeSchemaValue := range typeSchemaMap { valueVal, ok := valueMap[typeSchemaKey] if !ok { - return nil, ErrorMustBeDefined(typeSchemaValue) + return nil, errors.Wrap(ErrorMustBeDefined(typeSchemaValue), s.UserStrStripped(typeSchemaKey)) } valueValCasted, err := CastOutputValue(valueVal, typeSchemaValue) if err != nil { diff --git a/pkg/operator/context/resources.go b/pkg/operator/context/resources.go index 465c057263..123e067866 100644 --- a/pkg/operator/context/resources.go +++ b/pkg/operator/context/resources.go @@ -266,7 +266,7 @@ func validateRuntimeTypes( valueMapCasted[typeSchemaKey] = valueValCasted } else { if !typeSchemaValue.(*userconfig.InputSchema).Optional { - return nil, userconfig.ErrorMustBeDefined(typeSchemaValue) + return nil, errors.Wrap(userconfig.ErrorMustBeDefined(typeSchemaValue), s.UserStrStripped(typeSchemaKey)) } // don't set default (python has to) } @@ -402,7 +402,7 @@ func validateInputRuntimeOutputTypes(outputType interface{}, schema *userconfig. } } else { if !typeSchemaValue.(*userconfig.InputSchema).Optional { - return userconfig.ErrorMustBeDefined(typeSchemaValue) + return errors.Wrap(userconfig.ErrorMustBeDefined(typeSchemaValue), s.UserStrStripped(typeSchemaKey)) } } }