-
Notifications
You must be signed in to change notification settings - Fork 205
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
Use exception_page shard #991
Conversation
@dwightwatson Very nice! I haven't had enough time to work in this, Thank you so much! 👍
Check #274, I managed to get Exception pages working on 3 conditions:
Maybe we can use |
Thanks for the additional context - good to get a better understanding of how Amber all fits together. I've had a crack at breaking out a |
@dwightwatson @faustinoaq should this be included in the amber base controller or should this shard be injected in the end users project via the generators so they can handle how it works? |
That didn't occur to me - it should probably be a development dependency too. A quick look into that suggests that only development dependencies in the root |
Do you have any additional feedback on this one in order to get it merged in? |
Wait, we have https://github.com/amberframework/amber/tree/master/src/amber/cli/templates |
@drujensen This error page is suposed to work only on development I think we should look what others framework did here: Kemal Lucky
|
@dwightwatson Based on @faustinoaq response, I was wrong to ask to have you move the shard to the template. Can you move it back? :sorry: |
@dwightwatson thanks for this contribution. I will look into the shard location and see which is best. |
Apologies for not getting back to this sooner, was travelling for work. Thanks for sorting it out 😄 |
Description of the Change
Hi there - this is an attempted re-implementation of #864 but using the
exception_page
shard that was created out of it. Let me first confess that I'm very new to Crystal and Amber so this likely isn't perfect, but it is working.What I'm not positive for - and would appreciate some guidance on - is how to ensure this won't be displayed in a production environment. I haven't quite worked out how to get Amber running in production mode on my local machine so haven't been able to test it.
Alternate Designs
I customised the page with the Amber logo, project URL and brand colours. It's just a nice feel versus the stock standard layout.
Benefits
Very pretty exception pages which brings us into line with other Crystal frameworks like Kemal and Lucky.
Possible Drawbacks
It does introduce another dependency, but if
exception_page
is fairly standard across frameworks then it shouldn't be too much of a concern.