Closed willsower closed 3 years ago
In the future, this should be done in a different way. For example, currently, if we run a file, and it errors. We have the block inside a try/catch. If we catch the error, return the error.html page. However, an edge case is, if a user uploads 10 documents, and only 1 document fails, we should still direct the user to the download page, but explain file x
could not be rendered.
In application.py
# Render
file_links = start_polly(file_holder, bib_holder)
# try:
# # Render
# file_links = start_polly(file_holder, bib_holder)
# except EOFError as e:
# return render_template('error.html')
Will add more exceptions (I have a list from my debug.py file on school machines). Need to update the design a little. Currently have this commented out since Connor and I are debugging the files (with this page we can't see the errors) but this page is perfect for the end user.
If something doesn't render or our program errors out, we should direct the user to a page saying their file couldn't be rendered and a link letting them go back to the home page.