Skip to content

422 without scripts in head leads to GET #773

@guystrelitz

Description

@guystrelitz

To reproduce

Return a fully rendered 422 from a POST to a form (expected error response) without any scripts in the <head>.

Expected behaviour

Turbo replaces the page body, merges the head and still has scripts available.

Actual behaviour

Turbo decides that the page is ill-formed and makes an unnecessary extra GET request to the same URL.
No warning in the JS console. Nothing in the Rails log.

Config

turbo-rails 2.0.12
rails 7.0.7.2
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin21]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions