-
Notifications
You must be signed in to change notification settings - Fork 25
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
ErrorTemplate
doesn't need *two* arguments?
#16
Comments
Because if you are in Actix or Axum, and you detect an error(say 404), you can't create a Signal because you aren't in a Leptos Runtime. |
I see. I feel like leptos error handling (at least as demoed in this template) in general needs a revamp. It has been hard for me to comprehend what this code does at first pass. |
Definitely felt some of that writing it. My goals for Leptos error handling is simple, even if the code isn't as much.
1. Render same error page whether an error is detected in Axum or whether we are inside Leptos with user configurable templates and status codes.
2. Compatible with ErrorBoundary and our Result Error handling in Leptos. Needs to be reactive, so capable of displaying if something in Leptos switches to Error
3. Preferably similar to the version in Actix
Beyond that I am open to suggestions/improvements.
…On Wed, Aug 2, 2023, at 9:39 AM, Sridhar Ratnakumar wrote:
I see. I feel like leptos error handling (at least as demoed in this template) in general needs a revamp. It has been hard for me to comprehend what this code does at first pass.
—
Reply to this email directly, view it on GitHub <https://github.com/leptos-rs/start-axum/issues/16#issuecomment-1662565430>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABVBTCNZDTFXLUDX4QEDKPLXTJ7F7ANCNFSM6AAAAAA3BPXGCM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
@benwis by the way, when the standard
Related line: let errors = errors.get(); |
I've managed to decouple static file handling & error/404 handling such that SSR works with EDIT: Here's the |
Also it panics on line |
https://github.com/leptos-rs/start-axum/blob/182477f366dc0b43b909a6a845958382afcab613/src/error_template.rs#L28-L29
I can't find a reason why this requires two separate arguments. Using a single (non-optional) argument works just fine:
The text was updated successfully, but these errors were encountered: