Skip to content

Conversation

@Cervajz
Copy link
Contributor

@Cervajz Cervajz commented Sep 4, 2025

The goal of the first commit is to fix the Solid.UndefinedVariableError exception message that did not account for multiple variable names and thus rendering them all in a single word, for example:

A template such as {{ user.properties.email }} would show the following error when strict_variables is set to true:

Undefined variable userpropertiesemail

after the fix, the error message is Undefined variable user.properties.email

The second commit unifies the Solid.UndefinedFilterError error message with the UndefinedVariableError one by including the line number.

@Cervajz Cervajz force-pushed the fix/improve_undefined_error_messages branch from aa82067 to 2bcdea5 Compare September 5, 2025 06:58
@Cervajz
Copy link
Contributor Author

Cervajz commented Sep 5, 2025

Fixed a typo in commit message

def message(exception) do
variable = exception.variable

variable_name =
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we might be able to simply use variable.original_name here. It will account for all the weird ways that you can write a variable:

{{ post.text }}

vs

{{ post["text"] }}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I am going to look into that! :)

Copy link
Contributor Author

@Cervajz Cervajz Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edgurgel Done, see c51d42f please

@edgurgel
Copy link
Owner

edgurgel commented Sep 5, 2025

Thanks for the PR!! 🎉

@Cervajz
Copy link
Contributor Author

Cervajz commented Sep 10, 2025

I took the liberty and updated the changelog, which I forgot to do originally. I included a line for my earlier merged PR c9fba28.

I hope you don't mind, that I bundled it with this PR. It's in a separate commit, tho.

@Cervajz Cervajz requested a review from edgurgel September 10, 2025 15:24
@Cervajz Cervajz force-pushed the fix/improve_undefined_error_messages branch from 0f0de08 to 51c01a7 Compare September 10, 2025 15:36
@Cervajz
Copy link
Contributor Author

Cervajz commented Sep 10, 2025

I rebased the branch to resolve merge conflicts

@Cervajz
Copy link
Contributor Author

Cervajz commented Sep 10, 2025

I am not sure why the Elixir 1.17.x check failed here. I got it green with the same configuration locally:

CleanShot 2025-09-10 at 17 44 18

Could you, please, restart it?

@edgurgel
Copy link
Owner

Thanks for updating the changelog! Appreciated!

There is one flaky test related to printing time that I have to fix. This was the reason why the build failed.

Will release a new version soon!

❤️

Copy link
Owner

@edgurgel edgurgel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@edgurgel edgurgel merged commit 8977f9d into edgurgel:main Sep 15, 2025
5 of 6 checks passed
@edgurgel
Copy link
Owner

Thank you! 🎉 Will release a new version later in the week!

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

Successfully merging this pull request may close these issues.

2 participants