-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
link_to route helper shows obscure error for missing required arguments #1652
Comments
Seems that the standard compiler error has changed now with Crystal v1.5.0. Thinking about what would be expected and using my picture as an example... ideally it should point to the call to To think outside of the current implementation, we could have to have three different interfaces.
In the macro process of the action class, you'd extend the action with This is all just off the top of my head, so I have no idea if it'd even work. I'll look into it more as I'm interested in it right now. |
I wonder what this error message will look like in Crystal 1.6 with the errors changing crystal-lang/crystal#12469 |
Describe the bug
When using the
link_to
macro with a path that has required attributes, the error provided is not very helpful.Then jumping through the full error trace, our code's call doesn't bring much information either:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Catch the error for the user, suggest that the required attributes might need to be called using
.with
on the ShowPage to pass the required arguments into the pageScreenshots/code
If applicable, add screenshots/code samples to help explain your problem.
Versions (please complete the following information):
crystal --version
): 1.3.2The text was updated successfully, but these errors were encountered: