fix nilerr bugs

This commit is contained in:
David Christofas
2022-12-21 14:45:50 +01:00
parent d9ad32f75f
commit efe1fc52e0
5 changed files with 9 additions and 11 deletions
@@ -82,13 +82,11 @@ func (g Thumbnail) GetThumbnail(ctx context.Context, req *thumbnailssvc.GetThumb
}
generator, err := thumbnail.GeneratorForType(tType)
if err != nil {
g.logger.Debug().Str("thumbnail_type", tType).Msg("unsupported thumbnail type")
return nil
return merrors.BadRequest(g.serviceID, "unsupported thumbnail type")
}
encoder, err := thumbnail.EncoderForType(tType)
if err != nil {
g.logger.Debug().Str("thumbnail_type", tType).Msg("unsupported thumbnail type")
return nil
return merrors.BadRequest(g.serviceID, "unsupported thumbnail type")
}
var key string