We have a Superset instance, which is great, fantastic tool, and after a security change recently a user got a 500 with a stacktrace:
File "/opt/superset/venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/opt/superset/venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/superset/venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/opt/superset/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/opt/superset/venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/superset/venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/superset/venv/lib/python3.8/site-packages/fab_oidc/views.py", line 48, in login
return handle_login()
File "/opt/superset/venv/lib/python3.8/site-packages/flask_oidc/__init__.py", line 487, in decorated
return view_func(*args, **kwargs)
File "/opt/superset/venv/lib/python3.8/site-packages/fab_oidc/views.py", line 45, in handle_login
login_user(user, remember=False)
File "/opt/superset/venv/lib/python3.8/site-packages/flask_login/utils.py", line 158, in login_user
if not force and not user.is_active:
AttributeError: 'bool' object has no attribute 'is_active'
I know why this is happening, and it's a problem that the user got a stack trace at all. My first thought was to implement a custom error document in the apache reverse proxy, but that isn't working. What is the best way to implement a custom error page for common errors (403, 404, 500), so clients can't get a stack trace of the error with Superset?
Thanks!