betodealmeida commented on a change in pull request #14677:
URL: https://github.com/apache/superset/pull/14677#discussion_r633948559



##########
File path: superset/views/base.py
##########
@@ -364,6 +364,10 @@ def show_superset_errors(ex: SupersetErrorsException) -> 
FlaskResponse:
 @superset_app.errorhandler(HTTPException)
 def show_http_exception(ex: HTTPException) -> FlaskResponse:
     logger.warning(ex)
+    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")

Review comment:
       I'll update this to redirect only non-API calls.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to