[DOCS] Better error message for strict override variable fields (#452)

* [DOCS] Better error message for strict override variable fields

* fix unit test
This commit is contained in:
Jesse Bannon 2023-02-20 10:57:40 -08:00 committed by GitHub
parent 4ba41c757c
commit 9b90c367a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -213,8 +213,9 @@ class OverridesStringFormatterValidator(StringFormatterValidator):
"""
_variable_not_found_error_msg_formatter = (
"Override variable '{variable_name}' does not exist. "
"Available override variables: {available_fields}"
"Override variable '{variable_name}' does not exist. For this field, ensure your override "
"variable does not contain any source variables - it is a requirement that this be a "
"static string. Available override variables: {available_fields}"
)

View file

@ -110,6 +110,8 @@ class TestStringFormatterValidator(object):
if string_formatter_class == OverridesStringFormatterValidator:
expected_error_msg = (
f"Validation error in test: Override variable 'bah_humbug' does not exist. "
f"For this field, ensure your override variable does not contain any source "
f"variables - it is a requirement that this be a static string. "
f"Available override variables: {', '.join(sorted(variable_dict.keys()))}"
)