Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to get full object & variable name with strict_variables: true? #1782

Open
namolnad opened this issue Jan 29, 2024 · 0 comments
Open

Comments

@namolnad
Copy link

Hi there,

My organization uses strict_variables: true to determine when a variable is undefined, and though this works well, the error messages lack full context, which means I have difficulty passing proper instruction to my customers. As an example, if my customers template is something like: "Hello {{ customer.full_name }}, I am {{ sender.full_name }}" and the sender object is missing altogether or is missing the first_name key, then the error returned to me by liquid would be undefined variable full_name. This makes it non-trivial to determine whether the customer object might be missing/incomplete or if the sender object might be missing/incomplete, and thus it becomes very difficult to tell my customer what they should do to fix the error.

Am I missing some easier way to determine this info? Or would it be possible to adjust the error message returned to pass along the entirety of the context for this scenario?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant