Prevent HTTP 500 errors when failing to generate a thumbnail.
Review Request #6434 — Created Oct. 12, 2014 and submitted — Latest diff uploaded
If a file for a file attachment is not found when generating a
thumbnail, an exception is raised that bubbles up, resulting in a HTTP
500 error. Now, we catch that error as part of the other operations we
were sandboxing, log it, and return an empty string instead of bubbling
the error up.
I was able to load a review request on my dev server that referenced a
file attachment I had deleted from the disk.
Diff Revision 1
This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.
orig
1
2
reviewboard/attachments/mimetypes.py |
---|