PerlDancer / PerlDancer/Dancer2
Fix error template logic in core Error object
Open
Nobody has claimed this yet.
Beginner Suitable
- Dominant language
- Perl
- Stars
- 604
- Forks
- 288
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 5
Description
@mickeyn and I were delving into Dancer2::Core::Error and #565 and we have the following conclusions (brought up by a lot of anger and sitting for a few hours on this shitty class):
error_templateshould take precedence over rendering files (both the public/ and the views/ files) because this means the user wants this specific template to be rendered in case of errors.- In addition, we need to introduce a
default_error_templatewhich means, "you already tried to find a template for this code and an error page in public/, now please render this generic (default) error template for me".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Dancer2::Core::Error and read the related discussion in #565. Trace how error_template currently competes with rendering files in public/ and views/, then define the expected role of default_error_template. Done means the stated precedence is implemented and the generic fallback is used only after the specific template lookups fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100