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

feat: show nice error page in prod #16695

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

With SIP-40 and SIP-41 we introduced an error handler to Flask to format exceptions in a standard JSON payload. One problem with this approach is that users are seeing JSON payloads in production when a generic error occurs.

We already had some logic to show a nice 404/500 page when catching an HTTPException error. I extended the logic to uncaught exceptions as well.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

WIP, still haven't been able to trigger an error.

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Sep 14, 2021

Codecov Report

Merging #16695 (68386e6) into master (4b70d46) will decrease coverage by 0.15%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16695      +/-   ##
==========================================
- Coverage   76.88%   76.72%   -0.16%     
==========================================
  Files        1005     1007       +2     
  Lines       54005    54099      +94     
  Branches     7337     7337              
==========================================
- Hits        41522    41510      -12     
- Misses      12243    12349     +106     
  Partials      240      240              
Flag Coverage Δ
hive ?
mysql 81.68% <75.00%> (+0.07%) ⬆️
postgres 81.74% <75.00%> (+0.10%) ⬆️
presto ?
python 81.82% <75.00%> (-0.32%) ⬇️
sqlite 81.35% <75.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/views/base.py 75.65% <75.00%> (-0.78%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 69.80% <0.00%> (-16.87%) ⬇️
superset/db_engine_specs/presto.py 83.47% <0.00%> (-6.91%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 88.04% <0.00%> (-1.66%) ⬇️
superset/db_engine_specs/base.py 88.00% <0.00%> (-0.39%) ⬇️
superset/models/core.py 89.14% <0.00%> (-0.26%) ⬇️
superset/utils/core.py 89.76% <0.00%> (-0.13%) ⬇️
superset/charts/api.py 85.82% <0.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b70d46...68386e6. Read the comment docs.

@betodealmeida betodealmeida merged commit 7f804d6 into apache:master Sep 14, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants