change: use 404 as status when thumbnail can not be fetched (#1582)

This commit is contained in:
Michael Barz
2025-09-30 20:40:31 +02:00
committed by GitHub
parent d4752382d5
commit 3b27d8f580

View File

@@ -170,7 +170,7 @@ func (g Thumbnail) handleCS3Source(ctx context.Context, req *thumbnailssvc.GetTh
pp := preprocessor.ForType(sRes.GetInfo().GetMimeType(), ppOpts)
img, err := pp.Convert(r)
if img == nil || err != nil {
return "", merrors.InternalServerError(g.serviceID, "could not get image")
return "", merrors.NotFound(g.serviceID, "could not get image")
}
key, err = g.manager.Generate(tr, img)
@@ -262,7 +262,7 @@ func (g Thumbnail) handleWebdavSource(ctx context.Context, req *thumbnailssvc.Ge
pp := preprocessor.ForType(sRes.GetInfo().GetMimeType(), ppOpts)
img, err := pp.Convert(r)
if img == nil || err != nil {
return "", merrors.InternalServerError(g.serviceID, "could not get image")
return "", merrors.NotFound(g.serviceID, "could not get image")
}
key, err = g.manager.Generate(tr, img)