fix: check ignored errors

This commit is contained in:
rramiachraf
2024-03-04 18:46:23 +01:00
parent a5bc03959e
commit dccfd17bcc
6 changed files with 32 additions and 15 deletions

View File

@ -53,6 +53,8 @@ func ImageProxy(l *logrus.Logger) http.HandlerFunc {
}
w.Header().Add("Content-type", fmt.Sprintf("image/%s", ext))
io.Copy(w, res.Body)
if _, err = io.Copy(w, res.Body); err != nil {
l.Errorln("unable to write image", err)
}
}
}