Skip to content
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

Error Pages #331

Merged
merged 53 commits into from
Oct 17, 2023
Merged

Error Pages #331

merged 53 commits into from
Oct 17, 2023

Conversation

APB9785
Copy link
Contributor

@APB9785 APB9785 commented Aug 17, 2023

Goal

Beacon should allow creation of error pages at runtime, which are used for rendering HTTP error responses
Resolves #137

Implementation

  • Beacon now seeds a Default layout, as well as 404 and 500 error pages
  • Error pages are unique by site + status code
  • Only valid error status codes are allowed
  • mix beacon.install now sets the endpoint's :render_errors config

@APB9785 APB9785 self-assigned this Aug 17, 2023
Base automatically changed from apb/test-beacon-install to main August 22, 2023 14:06
@AZholtkevych AZholtkevych linked an issue Aug 22, 2023 that may be closed by this pull request
@APB9785 APB9785 marked this pull request as ready for review August 24, 2023 19:00
@APB9785 APB9785 requested a review from leandrocp August 24, 2023 19:01
lib/beacon/content.ex Outdated Show resolved Hide resolved
lib/beacon/content.ex Outdated Show resolved Hide resolved
lib/beacon/content.ex Outdated Show resolved Hide resolved
lib/beacon/content.ex Show resolved Hide resolved
lib/mix/tasks/install.ex Show resolved Hide resolved
@APB9785 APB9785 requested a review from leandrocp August 29, 2023 16:06
APB9785 and others added 15 commits August 29, 2023 15:33
compile a function for each part of the layout tree: root, layout, and page
where root takes the content of page+layout
It's possible to load those but requires injecting the LivePage env,
which is risky because a server error may happen due to internals or even
due to the components used in the pages, causing an endless loop.
So for now we won't load components due to the risk they impose but we can
revisit this if needed or if we find a safer approach.
@leandrocp leandrocp merged commit f568112 into main Oct 17, 2023
3 checks passed
@leandrocp leandrocp deleted the apb/error-pages branch October 17, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page Variants: Error pages Route and Resource Loading: Support error pages
2 participants