How display nginx error page with flask ? #4730
Unanswered
BobSquarePants
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Yes, you can. ...
@app.errorhandler(404)
def handle_404_error(error):
print(error) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I've just installed and setup nginx in front of my Flask/Gunicorn
While test it I see that some error page are handled by nginx (that make sense)

I've see that we can define custom page in the nginx config.
But all the example that I've seen are static.
is there a way the set one page/route in flask that will grab the error code ?
Then when can use within the page with jinja for example.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions