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: refine viz exception handling #9669

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

villebro
Copy link
Member

@villebro villebro commented Apr 28, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Currently form data validation errors are raised as Exception and aren't being caught in Flask views, causing uncaught application errors and false positives in error monitoring frameworks. This PR changes form validation exceptions in viz.py to QueryObjectValidationError-type exceptions (extends SupersetException), and catches them in the relevant Flask views. Application errors will not be caught in the views, ensuring that critical errors are still caught on error logs.

TEST PLAN

Local testing + CI

REVIEWERS

@willbarrett

Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

Yay! It's great to see we're not raising a base Exception anymore.

Copy link
Member

@willbarrett willbarrett left a comment

Choose a reason for hiding this comment

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

@villebro this is great, thank you for doing it!

@villebro villebro merged commit 8d2165d into apache:master Apr 29, 2020
@villebro villebro deleted the villebro/viz-exceptions branch August 7, 2020 07:00
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Feb 28, 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/L 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants