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

General Improvements: Skip invalid pages that fail to load #367

Open
leandrocp opened this issue Oct 25, 2023 · 0 comments
Open

General Improvements: Skip invalid pages that fail to load #367

leandrocp opened this issue Oct 25, 2023 · 0 comments
Assignees
Labels
area:loader Related to app and resource loading enhancement New feature or request help wanted Extra attention is needed roadmap Priority issues that will be released in the short term

Comments

@leandrocp
Copy link
Contributor

leandrocp commented Oct 25, 2023

We do validate templates and resources as much as possible but that's not enough since we expose a callback to customize template loading that may fail due to user errors, causing crashes that take the whole site down. Since the pages are lazy loaded, we can't perform checks early in the pipeline being open to such risk.

Now that we support error pages, we'll skip loading such pages and let beacon present a 404 error instead.

So instead of just raising when loading a page at

defp do_load_page(page) do

it will insert a new record in a ETS table storing the page id as key and both the stack trace and exception as value.

This ETS has to be created when the app starts, similar to

:ets.new(:beacon_assets, [:set, :named_table, :public, read_concurrency: true])
and it will look like this:

Table name: beacon_failed_pages
page_id reason
uuid {exception, stack_trace }

Having such feature allow us to display what caused the page to fail.

Related to #35 and BeaconCMS/beacon_live_admin#90

@leandrocp leandrocp added the proposal Idea in research phase label Oct 25, 2023
@leandrocp leandrocp changed the title Handle resource loading failures Skip invalid pages that fails to load Nov 1, 2023
@leandrocp leandrocp added enhancement New feature or request help wanted Extra attention is needed and removed proposal Idea in research phase labels Nov 1, 2023
@leandrocp leandrocp added this to the v0.1.0 milestone Nov 1, 2023
@AZholtkevych AZholtkevych changed the title Skip invalid pages that fails to load General Improvements: Skip invalid pages that fails to load Nov 2, 2023
@AZholtkevych AZholtkevych assigned leandrocp and unassigned leandrocp Nov 16, 2023
@AZholtkevych AZholtkevych changed the title General Improvements: Skip invalid pages that fails to load General Improvements: Skip invalid pages that fail to load Nov 23, 2023
@AZholtkevych AZholtkevych mentioned this issue Nov 23, 2023
29 tasks
@AZholtkevych AZholtkevych mentioned this issue Apr 20, 2024
45 tasks
@leandrocp leandrocp added area:loader Related to app and resource loading roadmap Priority issues that will be released in the short term labels May 17, 2024
@leandrocp leandrocp removed this from the v0.1.0 milestone May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:loader Related to app and resource loading enhancement New feature or request help wanted Extra attention is needed roadmap Priority issues that will be released in the short term
Projects
Status: In Progress
Development

No branches or pull requests

1 participant