Missing `else` clause in `check_and_serve_file`

Sentry reported an error in core.http.check_and_serve_file. The issue is that there's no else clause, and response is undefined. I don't know of a way to get more details behind this instance of the error, however, there's only one possibility I see triggering this: file_path refers to a directory.

This would be solved by adding a simple else clause to catch all possible remaining errors, though we should probably identify exactly what happened here and see if it needs special treatment. Why did a user try accessing a file that was actually directory, assuming my assessment is correct?

Edited Mar 18, 2024 by Dan Wysocki
Assignee Loading
Time tracking Loading