luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.59k stars 156 forks source link

Error: undefined local variable or method 'params' for Errors::Show #1647

Closed jwoertink closed 2 years ago

jwoertink commented 2 years ago

I'm actually shocked I haven't seen this before... Apparently you can't call params inside of an Error Action.... This data comes from context which is available inside of errors https://github.com/luckyframework/lucky/blob/e1a6adf8552676884e67528293d3142032387b4b/src/lucky/context_extensions.cr#L37

You may need this data for sending extra information to a bug reporting, or maybe for getting a current_user or something.