fix: wrong error handling

This commit is contained in:
Derrick Hammer 2024-03-29 12:28:46 -04:00
parent 09c9ab8614
commit 8ccd90825b
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -2003,8 +2003,9 @@ func (s *S5API) downloadFile(jc jape.Context) {
detectedType, err := mimetype.DetectReader(file)
if err != nil {
s.logger.Error("error detecting mime type", zap.Error(err))
_ = jc.Error(err, http.StatusInternalServerError)
return
}
_ = jc.Error(err, http.StatusInternalServerError)
mimeType = detectedType.String()
}