serve_file_with_etag()
returns HTTP 500
for a nonexistent file
#7202
Labels
serve_file_with_etag()
returns HTTP 500
for a nonexistent file
#7202
Description
If
serve_file_with_etag()
is called on a nonexistent file, then:werkzeug.utils.send_file()
raises aFileNotFoundError
...serve_file_with_etag()
does not catch...500
instead of404
.Steps to Reproduce
/var/lib/securedrop/store
.Expected Behavior
No server-side errors. (The Client's handling of this case will be reported separately.)
Actual Behavior
An error of the form (shown here for a missing
-reply.gz
):Comments
Note that the logic of this code-path explicitly skips checking of nonexistent files:
securedrop/securedrop/journalist_app/utils.py
Line 527 in f5ca29b
securedrop/securedrop/store.py
Line 158 in f5ca29b
securedrop/securedrop/store.py
Lines 137 to 139 in f5ca29b
The text was updated successfully, but these errors were encountered: