-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
feat: redirect 404/500 to static pages #14677
feat: redirect 404/500 to static pages #14677
Conversation
140cfab
to
6e47322
Compare
Codecov Report
@@ Coverage Diff @@
## master #14677 +/- ##
==========================================
- Coverage 77.55% 77.31% -0.24%
==========================================
Files 958 958
Lines 48549 48552 +3
Branches 5702 5703 +1
==========================================
- Hits 37651 37538 -113
- Misses 10697 10814 +117
+ Partials 201 200 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset/views/base.py
Outdated
if not config["DEBUG"] and ex.code == 404: | ||
return redirect("/static/assets/404.html") | ||
if not config["DEBUG"] and ex.code == 500: | ||
return redirect("/static/assets/500.html") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update this to redirect only non-API calls.
@betodealmeida we haven't integrated these yet in Preset, it's a perpetual backlog item :). LGTM |
* feat: redirect 404/500 to static pages * Show pages only on html requests
* feat: redirect 404/500 to static pages * Show pages only on html requests
* feat: redirect 404/500 to static pages * Show pages only on html requests
SUMMARY
We're currently returning a SIP-40 error payload on 404 and 500. I changed it to redirect the user to the static pages for these errors instead when running in production (not development).
@samtfm, @willbarrett how is this handled on the Preset side?
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TEST PLAN
ADDITIONAL INFORMATION