Skip to content
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

fix: render 404 page even on non-existent pages in /api #240

Merged
merged 2 commits into from
Jul 1, 2020

Conversation

JasonChong96
Copy link
Contributor

@JasonChong96 JasonChong96 commented Jul 1, 2020

Problem

The /api route has no default handler. This causes a 504 error to be shown to users when erroneously accessing a link under the /api route. Even though this is not a common mistake, it should still show the normal 404 page.

Closes #236

Solution

Add a default handler to /api that renders the 404 page.

@liangyuanruo liangyuanruo merged commit 9257bd7 into develop Jul 1, 2020
@liangyuanruo liangyuanruo deleted the 404-all-pages branch July 1, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP 504 Gateway Timeout on nonexistent routes under /api namespace
2 participants