Replaced panic with error

This commit is contained in:
Asaf Gartner 2022-05-30 21:52:13 +03:00
parent fe545ff0f3
commit 2bb14c1794
1 changed files with 1 additions and 1 deletions

View File

@ -448,7 +448,7 @@ func downloadDiscordResource(ctx context.Context, url string) ([]byte, string, e
content, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
return nil, "", err
}
return content, res.Header.Get("Content-Type"), nil