镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

AO3-5846 Attempting to access a URL with an unsupported extension (e.g. json) results in a 500 error - #6035

Open
Cubostar wants to merge 1 commit into
otwcode:masterfrom
Cubostar:AO3-5846
Open

Cubostar wants to merge 1 commit into
otwcode:masterfrom
Cubostar:AO3-5846

Conversation

@Cubostar

@Cubostar Cubostar commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-5846

Purpose

Redirects pages to 404 if they run into ActionView::MissingTemplate.

Testing Instructions

Go to a page such as https://test.archiveofourown.org/about.json, and you should be redirected to the 404 page instead of the 500 page.

Credit

Cubostar, he/him

@Cubostar

Copy link
Copy Markdown
Contributor Author

When I tried to reproduce the bug, I only could reproduce the bug for home pages rendered with home_controller.rb. Putting the change in this file also appeared to fix the bug, but I figured that keeping it in application_controller.rb as suggested in the Jira ticket made more sense in case there are pages that I didn't find that have the bug.

@marcus8448 marcus8448 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants