nbgallery / nbgallery

Enterprise Jupyter notebook sharing and collaboration app
MIT License
147 stars 36 forks source link

Update error message when uploading notebooks if Session Authenticity invalid #579

Closed manfromjupyter closed 11 months ago

manfromjupyter commented 3 years ago

When receiving an Invalid Authenticity token, the error says anything but. Only reason we know that is what it is is because we checked the logs. If we can catch for CRSF issues and can print accordingly it would be vastly more user friendly.

Error we get is "Error: 500 Internal Server Error If you are the administrator of this website, then please read this web applications log file and/or the web server's log file to find out what went wrong."

Ideally should be ex: "Error: There is an Invalid Authenticity token present in your session. Please refresh the page and try again." or something similar, idk

mcrutch commented 3 years ago

I will say, odds are, users aren't seeing this message because it is happening behind the scenes when they say save to gallery. The first step does the staging in an ajax call and THEN redirects them in the browser.