fix: wrong error handling
This commit is contained in:
parent
09c9ab8614
commit
8ccd90825b
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue