This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
Panic for http.FileSytem that returns non-os.ErrNotExist
with ServeFiles
#2057
Labels
Description
The filesystem router via
app.ServeFiles
doesn't check for non-os.ErrNotExist
errors. This causes panics if a response returns a different error and a nilhttp.File
. It appears to have a similar problem withStat
.buffalo/route_mappings.go
Line 105 in 62926f4
Steps to Reproduce the Problem
Expected Behavior
I'm not sure what the best behavior would be to do here. Probably the built-in 500 error page. Alternatively it could log the error and skip to the next asset like it does if it returns
os.ErrNotExist
Actual Behavior
Request panics, and client receives no response.
Info
The text was updated successfully, but these errors were encountered: