message: feat: do not redirect on 404/500
diff: @@ -31,6 +31,7 @@ from flask import (
  redirect,
  request,
  Response,
  + send_file,
  session,
  )
  from flask_appbuilder import BaseView, Model, ModelView
  @@ -43,6 +44,7 @@ from flask_babel import get_locale, gettext as __, lazy_gettext as _
  from flask_jwt_extended.exceptions import NoAuthorizationError
  from flask_wtf.csrf import CSRFError
  from flask_wtf.form import FlaskForm
  +from pkg_resources import resource_filename
  from sqlalchemy import or_
  from sqlalchemy.orm import Query
  from werkzeug.exceptions import HTTPException
  @@ -390,7 +392,8 @@ def show_http_exception(ex: HTTPException) -> FlaskResponse:
  and not config["DEBUG"]
  and ex.code in {404, 500}
  ):
  - return redirect(f"/static/assets/{ex.code}.html")
  + path = resource_filename("superset", f"static/assets/{ex.code}.html")
  + return send_file(path)
  return json_errors_response(
  errors=[
  