Skip to content

Turbo frame doesn't render response HTML if status is 4xx or 5xx #326

@janko

Description

@janko

I'm trying to implement custom error pages in a way that will work with turbo frames. I'm using the strategy where I have config.exceptions_app = self.routes in my config/application.rb, and I have an ErrorsController that's rendering the error pages (404 & 500 for now).

This works with Turbo Drive, and how I want it to behave with Turbo Frames is that an error message would be rendered inside the turbo frame instead of the content. However, it seems that Turbo Frames doesn't render the response HTML if the status is 4xx or 5xx. This is regular asynchronus frame loading with a GET request, it's not form submission.

So, what I'm basically asking for is this functionality – #39, but to have it work for GET request as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions