You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That issue is closed, but I have tested this with the Turbo main branch as of yesterday (I notice there have since been some commits).
I see there have been some work on this with the turbo:frame-missing for Turbo Frames, but for Turbo Drive this still leads to a faulty and unpredictable state.
I have a patched version that simply add the 404 to the OK list here:
@seanpdoyle I have tested my app with both v7.2.0-rc.2 and v7.2.0-rc.1. I'm using Turbo with an AlpineJS app, an what I see on 404 errors are some uncaught JS errors indicating a somewhat corrupt state:
I think this issue is about 2 things:
Whether 404 should be considered an error situation (from a rendering perspective). In my experience, the answer is almost always no (render a 404 page with a linke to the home page or something).
For real errors, Turbo users should be given a way to somehow recover.
This GItHub issue is mostly about 1, and I would be a happy camper if isSuccessful would consider 404 to be a success (or if this could somehow be configured).
bep
changed the title
drive: HTTP status 404 (and 500?) behaviour is buggy and unpredictable
drive: HTTP status 404 behaviour is buggy and unpredictable
Sep 15, 2022
This has been a topic before, e.g. with @denydias 's comment in #188 (comment)
That issue is closed, but I have tested this with the Turbo main branch as of yesterday (I notice there have since been some commits).
I see there have been some work on this with the
turbo:frame-missing
for Turbo Frames, but for Turbo Drive this still leads to a faulty and unpredictable state.I have a patched version that simply add the 404 to the OK list here:
turbo/src/core/drive/visit.ts
Line 490 in d81e24d
I would say that from a rendering perspective (which is Turbo's domain), a 404 is (almost always?) a correct thing to do.
The text was updated successfully, but these errors were encountered: