Skip to content

link_to route helper shows obscure error for missing required arguments #1652

@grepsedawk

Description

@grepsedawk

Describe the bug
When using the link_to macro with a path that has required attributes, the error provided is not very helpful.
image

Then jumping through the full error trace, our code's call doesn't bring much information either:
image

To Reproduce
Steps to reproduce the behavior:

Example:

  1. Generate a show route
  2. Use show route without calling anything: link draw.to_s, to: ::Draws::Show

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 page

Screenshots/code
If applicable, add screenshots/code samples to help explain your problem.

Versions (please complete the following information):

  • Lucky version (check in shard.lock): 0.29.0
  • Crystal version (crystal --version): 1.3.2
  • OS: macOS

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions